hmemcpy / AgentMulder

** THIS PLUGIN IS NO LONGER MAINTAINED. PLEASE FOLLOW ERNICOMMUNITY FOR UPDATES **
https://github.com/ERNICommunity/AgentMulder
MIT License
151 stars 33 forks source link

Performance problem using AgentMulder #20

Open DanielTheCoder opened 12 years ago

DanielTheCoder commented 12 years ago

Hi, It seems like that using AgentMulder is causing some typing performance problems. I've created a performance snapshot and jetbrains opened a bug for it which can be found here: http://youtrack.jetbrains.com/issue/RSPL-4924

If it helps i can provide it to you somehow, it's about 60 Mb and I think you need Jetbrains dottrace to open it.

Br, Daniel

citizenmatt commented 12 years ago

It looks like it's due to ContainerRegistrationAnalysisStageProcess re-analysing the whole solution for registrations in the constructor. This class is created for each file that's opened, or for each file in the solution during solution wide analysis, so this will be very costly for larger solutions.

A better solution would be to look at implementing ICache for the registrations. ReSharper would then call this whenever a file changed, so registrations could be added/removed/updated per file. The cache could even be persisted to improve things further. Then the analysing daemon process could just refer to the cache to get the registrations to check. A further optimisation would be to also cache the types that are registered - perhaps in a second implementation of ICache.

Take a look at TodoManager and friends, and also TodoItemsDaemonStageProcess.

Give me a shout if this doesn't make sense! Matt

hmemcpy commented 12 years ago

Yes, unfortunately this is true, currently the solution is being scanned every time. I wanted to implement caching using ReSharper but I didn't really know how... I do now :)

That goes on the fix list ASAP.

Thanks Matt and Daniel!

hmemcpy commented 11 years ago

Hello,

I wonder if you could try this version: https://github.com/downloads/hmemcpy/AgentMulder/AgentMulder1.0.4.99.msi

I stepped back in my commit history to try and find when it became sluggish, I think I found the reason. It still does not cache the results, that's in the priority, but at least it shouldn't cause immediate performance hits.

Please try this one and let me know if it helped somewhat!

Thanks!