Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dart Editor takes too long building workspace after save #2297

Closed
DartBot opened this issue Mar 25, 2012 · 10 comments
Closed

Dart Editor takes too long building workspace after save #2297

DartBot opened this issue Mar 25, 2012 · 10 comments
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures
Milestone

Comments

@DartBot
Copy link

DartBot commented Mar 25, 2012

This issue was originally filed by @sethladd


A 50k line Dart file takes too long to "rebuild" after a save/change in the editor. This process blocks the user, eventually convincing them that saving is too cumbersome of an operation.

The Editor should transparently, in the background, rebuild and reanalyze the files as the developer types, without interrupting the developer.

See https://plus.google.com/107016091651015882408/posts/FVWEKMN32xG

@DartBot
Copy link
Author

DartBot commented Mar 25, 2012

This comment was originally written by @ltackmann


Small correction, its not a 50k dart file but a 50k dart app ;).

Also the problem is apparent in a much smaller code base already around 5k the delays starts to get bad and above 10k its intolerable.

 

@DartBot
Copy link
Author

DartBot commented Mar 25, 2012

This comment was originally written by [email protected]


One of my projects (Buckshot: https://github.com/prujohn/Buckshot) is 27k lines, including demos, etc.
My machine, which is Win7-64, 32gb RAM, 6-core.

During re-factoring, particularly if I save a file that breaks code in many other files, the Editor will slow to a crawl. The workspace build will sometimes hang, leaving me unable to close the editor, and in some cases, I'll have to reboot the machine in order to clear it.

In one instance, the editor would hang on build, whenever I loaded the project, even after clearing the workspace directory and reloading. I had to go in and manipulate files outside the editor until it would load successfully.

@DartBot
Copy link
Author

DartBot commented Mar 25, 2012

This comment was originally written by [email protected]


I've got buckshot up in a copy of the Editor, build 5549. Can you give me an example of a pathological edit?

@DartBot
Copy link
Author

DartBot commented Mar 26, 2012

This comment was originally written by [email protected]


The steps below aren't exactly what I did the other day to get the Editor to hang, but it seems to work.

  1. In lib/system/FrameworkElement.dart, place something breaking at line 129, like an incomplete function: 'someFunc(foo, bar) =>'. Save the project.
  2. In the editor, RENAME the lib/system directory to lib/sys.
  3. In lib/Buckshot.dart, begin to fix the file paths one file at a time (this is important), and save after editing each line. Try to overlap a save with the workspace build/indexing process.

After doing this a few times, you'll notice the editor UI start to lag in responsiveness. What I am trying to re-create with #­3 is the scenario where I am coding and saving files faster than the editor can keep up, which is frequently in project as large as Buckshot.

  1. Now, repeat step #­3 a few more times, and then CANCEL the workspace build while it is still in progress. This put the editor into a hung state for about 10 minutes on my machine and resulted in an error dialog (attached).

Hope this helps a bit. This happens to me about once/day.


Attachment:
dart_editor_error_dialog.png (23.81 KB)

@DartBot
Copy link
Author

DartBot commented Mar 26, 2012

This comment was originally written by [email protected]


Sorry, forgot to mention: I'm on build 5807.

@DartBot
Copy link
Author

DartBot commented Mar 27, 2012

This comment was originally written by [email protected]


Removed Priority-Medium label.
Added Priority-High, Area-Editor, Triaged labels.

@clayberg
Copy link

clayberg commented Apr 2, 2012

Set owner to @danrubel.

@danrubel
Copy link

Issue #2895 has been merged into this issue.

@clayberg
Copy link

clayberg commented Jun 1, 2012

Added this to the M1 milestone.

@keertip
Copy link
Contributor

keertip commented Jun 5, 2012

Added Fixed label.

@DartBot DartBot added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures labels Jun 5, 2012
@DartBot DartBot added this to the M1 milestone Jun 5, 2012
dart-bot pushed a commit that referenced this issue Jan 16, 2020
New commits included in this revision:
```
$ git log --pretty=oneline 4d8ecbd409d773fec47da33b7e6c8db0b51487fd..429a06039d185149f387a65e3503b0693ce6d24e
429a06039d185149f387a65e3503b0693ce6d24e (HEAD -> master, origin/master, origin/HEAD) Parallel fetching of available versions (#2280)
6705b085b9bf4754a4c8002a070f436f115dc4d1 Retry on all SocketExceptions (#2254)
a1820273b9f3c7bb5a13d26cd14d30d5bab187ae Use a unqiue file name for the snapshot during testing. (#2303)
72686563e767f8a359e48a267a2c323953a6a0ef Include osx and windows testing on Travis (#2299)
a7a66821d13920b9b22cc394dfa55c679e971e40 Fail travis for lints and warnings (#2301)
25aa24c023453f064dad8f3cce1bbd55269d0efa Omit languageVersion when there is no SDK constraint (#2300)
82e60a3dcb3afe753563e7d304827fb650bc4833 Use LOCALAPPDATA for system cache on windows (#2297)
ceaa86f2c7eb35f044b4c202268a17361de68d13 Enforce and fix lints from package:pedantic (#2291)
6ce1606564352c305bd0f6d97704f0f7f6ebbca0 Use more collection literals for args (#2293)
be245e6baeebb71aaf3b3a260fcfbbb011a9a7e0 Rename some test utilities from Mock to Fake (#2294)
f7638ce85298df7d9e73d717dd4d81f499681720 Refactor Set.add following !Set.contains (#2295)
390022b24bc076cb934385936ac7904f045a75ba Filter out `null` from `getCachedPackages`. (#2292)
0eea0c4421ed0b83c8597b62dacf68b93de172b9 Fix existing hints and lints (#2290)
7cf2fe860a40517ccb65f5efdda9e4dc350142c3 promote strict deps failures to errors from warnings (#2289)
```

Change-Id: I62782b29e16092114940df00811bfdd20c8045fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131839
Reviewed-by: Jonas Jensen <[email protected]>
Commit-Queue: Sigurd Meldgaard <[email protected]>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

4 participants