#8 Bulk nudge of directives in large files is slow

v1.0_(example)
open
Ben Supnik
None
5
2014-02-14
2013-09-20
Ben Supnik
No

Bulk nudging of parts in large projects is slow - significantly slower than the frame-rate. From what I can tell, the problem is that noteNeedsDisplay is being triggered by every part that is nudged, and thus a whole bunch of app-wide state is being beaten once per part. For example, this API rebuilds all of the menus.

The 'fix' is to coalesce the notifications and run the process once for the entire nudge.

Discussion

  • Ben Supnik
    Ben Supnik
    2014-02-14

    Some perf notes - release opt, first-gen retina-book i7 (read: pretty fast machine) select-all on 4k parts takes over 21 seconds.

    Nudging those 4k parts then takes 62 seconds!!

    It looks like almost all of the time (91% in the case of the nudge) is being spent on notifications.

    From my last investigation, the notifications are running per-part-in-edit, for massive thrash. If this is true, the cost of the nudge should be less than 6 seconds if fixed.

    This bug may be worse in 3.0 since the overall menu update is now heavier due to related parts, but the underlying bug is running multiple notification updates within the edit, making edit time proportional to the size of the edit.