wip tuning

History Key

  • New content
  • Removed content

Recent Versions

Choose two versions to compare, or click the link to view it.

  1. 14. over 1 year by david.bernard.31
  2. 13. over 1 year by david.bernard.31
  3. 12. over 1 year by david.bernard.31
  4. 11. over 1 year by david.bernard.31
  5. 10. over 1 year by david.bernard.31
  6. 9. over 1 year by david.bernard.31
  7. 8. over 1 year by david.bernard.31
  8. 7. almost 2 years by david.bernard.31
  9. 6. almost 2 years by david.bernard.31
  10. 5. almost 2 years by david.bernard.31
  11. 4. almost 2 years by david.bernard.31
  12. 3. almost 2 years by david.bernard.31
  13. 2. almost 2 years by david.bernard.31
  14. 1. almost 2 years by david.bernard.31
 

!! deprecated !!

Overview

Goals :

  1. remove/reduce the eclipse freeze (except from user request, force clean+build)
  2. allow GC to free more memory when needed to build,... (eg : free some information from previous build (from same or other project))
  3. use less CPU
  4. avoid too many compilation, sometimes not uptodate data (AST) is acceptable
  5. less allocation, reuse object if available
  6. reduce memory used to build

To rich those goals, there is several axes/startegies, Tuning is allowing to provide/configure/use them and to collect feedback information. The majority of proposal should impact scala-ide, but during investigation some bug or enhancement can be only allowed by modification of scala-compiler (TODO : define the way to follow in this case : fork full scalac, move patched classed under a scala-ide project, use aspect to monkey patch scalac like for jdt ?).

Some major difference vs command line compilation :

  • compiler could be resident
  • there is several project to compile
  • each project could use several compiler (presentation vs builder)

How to help :

  • provide feedback about tuning feature
  • capture and share information about freeze, memory leak,... in this page or in tickets (I'll try to share mime here) Eg when my eclipse start to freeze :
    1. I start a visualvm (could be download alone or use the one provide in jdk 1.6.0_21)
    2. I open the monitor of the eclipse process
    3. I wait few second, take a screenshot (see samples below) for gc and memory issue I also do a Heap dump (and save it for postmordem analyze with VisualVM or Mat).

Roadmap :

DONE :

  • add a Tuning Preferences page (change need to restart eclipse)
  • allow user to choose between strongly caching the last Compilation Result of single File or soft caching every Compilation Result
  • add StopWatch about call to compilers (open web browser to http://localhost:9999/ to see data or to disable collect)
  • provide a update-site for wip_tuning, or something to allow user to test tuning without need to build there own plugin at http://alchim31.net/scala-ide/update-wip_tuning

TODO :

  • allow several type of reference ScalaPresentationCompiler and EclipseBuilder : Strong, Soft, Weak
  • provide a Log.info and enable it from TuningPreferences
  • StopWatch (if feature keep)
    • dynamics change (Property listener) of goupe enable/disable
    • provide a button to start/stop web server
    • provide a View for the html output provide by internal webserver
    • if need, change for implementations (don't forget dependencies,...) :

Scala-compiler's issues :

Stuff to explore :

  • share stuff (data, 'service') between builder and presentation compiler of a common project
  • share stuff (data, 'service') between compilers of several projects (eg: Names tables : big table of char)
  • using a background job with +/- fixed rate to run compilation (start with ScalaPresentationCompilation) about eclipse periodic task/job, (instead of nsc.interactive.Global TaskThread/Executor) see
  • to avoid compiling every time and freeze at wrong time, only run compilation after some idle time or now (end user request)
  • may be using aspect to inject interceptor for StopWatch and other metric instead of hardcode aroundMethod call by hand (everywhere) with a trait
  • deeply understand scalac code
  • learn more GC tuning

original idea from : mailing-list plugin tuning

Screenshots :

CPU eat by GC Activity

Memory Usage

Number of Compilation run on startup