thSoft / elysium

LilyPond IDE for Eclipse
http://elysium.thsoft.hu
14 stars 3 forks source link

#107 improve build performance by caching default import URIs #113

Closed nittka closed 8 years ago

nittka commented 8 years ago

When doing some more performance analysis, I noticed that the getImportedUris part of scoping took quite a bit of time, (although the result is cached per resource). The reason is that in order to determine the imports, all resources are loaded (and linked) - and the default imports are loaded and linked again and again and again.

The naive performance boost implementation determines the default import URIs once and stores them. The impact on my machine is quite significant (disabling LilyPond compilation, a clean build for the Mozart-KV250 test project takes about than half the time). Note that with this modification, the index entries for the default imports are still always recreated.

nittka commented 8 years ago

Could you please review this modification. I think it would be nice to have this improvement in the next release.

thSoft commented 8 years ago

Thank you very much! I can also confirm the performance gain empirically. However, this raises the need for performance testing. I'm creating an issue for it (it is not trivial).