"iter" live template takes much longer in IC2

Issue #836 resolved
Derek Wiers created an issue

I just upgraded to IC2 and the featureset is very welcome! Thanks for all your hard work! I use live templates a decent bit to speed up my dev time and "iter" always takes a second in IC1.X - I totally get that as it has to figure out all the collections that are in scope at the moment - however in IC2, it takes a good 5-10 seconds, kinda killing the "live template" mood. I imagine there's just more metadata in IC2 to parse through - but do you think it could maybe be streamlined for performance a bit? I'm on 2.0.0.3. Thanks again!

Comments (7)

  1. Scott Wells repo owner

    I noticed that as well today. It's on my very short list to investigate and fix. Thanks for logging the issue here so I have something concrete to track it!

  2. Derek Wiers reporter

    Just as a quick update, I found that it also happens for a custom template I designed but still looks for collections the same way as the standard "iter" does. Others such as "nm" and "ns" aren't so bad.

  3. Scott Wells repo owner

    Yeah, I did a little profiling and see where at least half the time is going. It's something that was used for another recent fix (and it's a bit surprising honestly...basically it's calls to an enumeration's valueOf() method). I should be able to tune that out pretty quickly and will look for any other low-hanging fruit. Should be pretty easy to get back to the previous performance, though.

  4. Scott Wells repo owner

    Yep, just removed all that additional overhead. If you want I can post a build here so that you can verify that you see the same improved performance. Either way I'll include it in the next build. Kind of embarrassed that I allowed this one to get out into the wild!

  5. Scott Wells repo owner

    Here...if you want to try this, it's just 2.0.0.4 that I released today with this optimization. I'll try to release a new official build with this in it tomorrow or Friday. Let me know if you still see live templates taking longer than in IC1.

  6. Scott Wells repo owner

    Delivered in 2.0.0.5. Let me know if you don't see at least as good of performance as in IC1 (perhaps a little better).

  7. Log in to comment