1
votes

Everytime I hit Ctrl + S in Dart Editor the application freezes for several seconds, sometimes up to half a minute. After that it says Build completed successfully in the Tools Output.

I have a habit of constantly saving my work. Having that operation take so long is aggravating, to say the least. It makes the editor almost unusable to me.

Is there any way to disable the automatic on-save build?

EDIT 1:

Stopping Pub Serve helped in some cases, but the editor still froze every other time, eventhough Build completed successfully did not appear in the Tools Output. It seems that Refreshing workspace was taking really long.

Since I could not remember this problem ever being so severe I looked into my older projects to find anything I did differently. In fact this time I put my sources into the /lib folder and referenced them via packages:<myproject>/<myproject>.dart. Surprisingly moving the /lib to /web/lib and importing via lib/<myproject>.dart instead seems to have fixed the freezing issue. Any ideas why that might be?

EDIT 2:

My system:

  • Dart Editor version 1.9.3.release (STABLE)
    • Dart SDK version 1.9.3
  • Lenovo IdeaPad Y510p
    • Intel Core i7-4700MQ CPU @ 2.40GHz
    • 8GB RAM
  • Windows 8.1 Pro
1
This is weird because ../lib/<myproject>.dart is an invalid import path. You shouldn't "walk" outside a package top-level directory in import paths (except in html-imports in Polymer where no package: exists). You didn't provide more information about your Dart version and OS. - Günter Zöchbauer
This was an error on my part when writing the edit. Fixed the question and added system specs. - Lucius
I see. Perfectly fine as far as I am aware to have a lib folder in web. You can try to disable the analyzis server in the DartEditor settings. I think you should create a bug report at dartbug.com. I'm sure they are interested in your experience. Please crosslink the issue and this SO question. - Günter Zöchbauer
I will investigate further and try if I can isolate the issue. Then I will create the report. As usual, thanks for lightning-fast support. - Lucius

1 Answers

1
votes

I'm pretty sure this is pub serve running in background which recognizes file changes and rebuilds. In the tools output window top-right corner is an icon with the tooltip Stop Pub Serve which allows you to stop it. pub serve is automatically launched when you run a Dart web application from DartEditor.

I don't use DartEditor a lot (mostly WebStorm since a few months) but pub serve should not block DartEditor.

Can you provide more information about your

  • Dart version
  • Hardware
  • OS

Consider creating a bug report at http://dartbug.com