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

Improve the ability to share analysis between contexts #14489

Closed
DartBot opened this issue Oct 26, 2013 · 11 comments
Closed

Improve the ability to share analysis between contexts #14489

DartBot opened this issue Oct 26, 2013 · 11 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Oct 26, 2013

This issue was originally filed by andrejnav...@yahoo.com


What steps will reproduce the problem?
Here are my observations with the latest versions of Dart Editor:

  • With Dart Editor, versions 0.8.X, I've noticed that I cannot start Dart
    Editor anymore - see print screen [1]. To solve this problem I have followed
    an internet advice, and I have deleted "-vmargs" option from "DartEditor.ini"
    file.
  • In my workspace I have about 25 projects. Almost all of them are very
    small Polymer projects with maximum 100 lines of code per project. I've
    noticed that during workspace initialization my laptop uses about 13% of
    CPU power, and during that time the Dart editor is unresponsive. Analyzing
    all projects takes very long time, about three minutes. With 'unresponsive'
    I mean that I have to wait more than 5 seconds for a response of the
    editor for a mouse click.
  • Whenever I modify any file in my workspace, Dart analyzer starts immediately,
    even without saving a file, and my Dart editor becomes unresponsive, sometimes
    for about 10 seconds and sometimes even for about 45 seconds.
  • If I try to rename a file, dialog window pop-ups with a message
    "Waiting for background analysis...". I receive the same message if I try
    to rename a file 5 or 10 minutes later.
  • I have also seen message "Something gone wrong. Please ..."
  • I have noticed that Java process run at 13% of CPU power for a minute
    after I had already closed the Dart Editor.

Dart Editor a log file [2] is also included from my last two sessions. In the
log file a lot of Java "java.lang.OutOfMemoryError" exceptions could be seen.

[1] - could-not-create-the-java-virtual-machine.png
[2] - dart-editor.log.txt

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Windows 7
Dart Editor version 0.8.5_r28990
Dart SDK version 0.8.5.1_r28990

Please provide any additional information below.


Attachments:
dart-editor.log.txt (79.31 KB)
could-not-create-the-java-virtual-machine.png (45.98 KB)

@floitschG
Copy link
Contributor

Added Area-Editor, Triaged labels.

@clayberg
Copy link

cc @bwilkerson.
cc @scheglov.
Set owner to @danrubel.
Added this to the M8 milestone.
Removed Priority-Unassigned label.
Added Priority-High label.

@clayberg
Copy link

This is basically a OOM situation with lots of swapping cased by the large number of Polymer projects (25 non-Polymer projects would not have the same problem). Polymer is quite large with a lot of dependencies. At the moment, each project gets its own copy of Polymer and its dependencies which gets fully analyzed independently of the other projects (since each could theoretically depend on a different version of the Polymer package). This will be optimized in the future so that each unique combination of Polymer and its dependencies will be analyzed once and result in a significant reduction in memory usage. This should eliminate the OOM errors that are seen in this case and the resulting swapping and performance degradation.

There are couple of short terms workarounds that should help until we can put the above optimization in place.

  1. Edit the DartEditor.ini file and increase the max memory allowed to something like Xmx3000m. This would, of course, be dependent on how much physical memory you have available to give to the Editor. In this case, the more you can spare, the better the performance will be.

  2. Combine multiple Polymer-based projects into a smaller number of projects. A single Polymer project with 25 Dart files in it would use much less memory that 25 Polymer projects each with a single Dart file in it.

  3. Close one or more of the projects so that they are not all resident at the same time.


cc @danrubel.
cc @jwren.
Set owner to @bwilkerson.
Removed this from the M8 milestone.
Added this to the Later milestone.
Removed Priority-High, Area-Editor labels.
Added Priority-Medium, Area-Analyzer labels.

@bwilkerson
Copy link
Member

Changed the title to: "Improve the ability to share analysis between contexts".

@clayberg
Copy link

Removed Type-Defect, Priority-Medium labels.
Added Type-Enhancement, Priority-High labels.

@clayberg
Copy link

Removed Type-Enhancement label.
Added Type-Defect label.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Added this to the 1.6 milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed Oldschool-Milestone-Later label.

@bwilkerson
Copy link
Member

This is a reminder for a longer term goal.


Removed this from the 1.6 milestone.
Removed Priority-High label.
Added Priority-Medium label.

@DartBot DartBot added Type-Defect area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Jul 11, 2014
@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Feb 29, 2016
@bwilkerson
Copy link
Member

This is now obsolete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

6 participants