The slow Code Insight could be much faster

By | October 31, 2010

If you have medium to large size projects with thousands of units, you either curse Code Insight every time it tries to pop up or you have disabled it because you can’t stand the time it takes to pop up. For small projects Code Insight is fast, but the more units you have the slower it becomes till it becomes unusable.

This video shows what the upcoming IDEFixPack does with Code Insight.

30 thoughts on “The slow Code Insight could be much faster

  1. Stรฉphane Wierzbicki

    Great ! I’m always disabling all insight feature because of their BIG slowness.
    I’m looking forward to your new IDEFixPack ! Hope to get it soon ๐Ÿ™‚

  2. Fabricio

    Wow!!!! Coolest!
    I don’t dare asking what kind of arcane trickery you’ve done to get this… ๐Ÿ˜‰

    1. Andreas Hausladen Post author

      The trickery is called specialized hash tables and caching. I still need some time to verify that I haven’t broken anything. Those changes only work in Delphi 2009 and 2010. In Delphi XE I break the compiler, that’s why I haven’t recorded the video in Delphi XE.

        1. Andreas Hausladen Post author

          I haven’t tried to migrate the patching code to Delphi 2007 (for this I would have to start a VM). But Delphi 2009 is Unicode, so the Delphi 2007 and 2009 compiler may be too different.

          1. HeartWare

            I would love to have this speed in Delphi 2007. I still have all my projects in 2007 – haven’t started yet the upgrade path to 2010 (too many components that need to be upgraded).

          2. Andreas Hausladen Post author

            It looks like Delphi 2007 would be possible. I found almost all byte sequences (opcodes) in the dcc110.dll with slight different cpu register usage.

  3. Bora Aydemir

    I’m upgrading from D2007 to D2010. This will be my bonus ๐Ÿ™‚
    Excellent!!!!

  4. Eko Indriyawan

    Your stuff is cool, although I have a big application,
    my application was developed with good design, so
    I do not need to load it all into one single project.

    Any way, your video is so cool…

    regards,

    Eko Indriyawan

    1. Eko Indriyawan

      Hello Andy,

      I would be surprised when you can show me the video
      for showing Find Class Dialog more faster.

      I have published this issue in embarcadero forum, I hope
      you can make it real.

      Thank in advance.

      Regards,

      Eko Indriyawan

  5. rpoulin

    I have disable Delphi Code Insight. Instead i use CNWizard’s Code Insight triggered by short cut key only (many other features are included). Waiting for your solution.

  6. John

    Each and every time you make CodeGear/Embarcadero look like newbies (sorry but that’s the only expression that comes to mind).
    Keep up the good work, and shame on the Embarcadero dev team for not optimizing their code in the first place.

    1. Andreas Hausladen Post author

      They are definitely not newbies. I’m now optimizing the compiler because they did not leave much room to optimize the IDE any further with Delphi XE.
      For the compiler: They spent their time making it stable what is more important than making things faster. I can’t make the compiler more stable, but I can make it faster (in a limited way). So I’m fine with them spending their time in giving us a stable compiler.

  7. Dorin Duminica

    what can I say?! except: Outstanding job Andy!! if you need further testing please e-mail me the fixpack and I would gladly test it while I work with D2010 and reply with errors if any โ€” I highly doubt.

  8. Linas

    Great work, but I have one question. Can you make code insight working in the background thread? Because now you don’t have any option but to wait for it to complete or to disable it. I hate when IDE freezes when I’m writing the code.

    1. Andreas Hausladen Post author

      That’s something I already thought of. But at the moment this is at a lower priority because with the new changes Code Insight only re-parses the changed files (or all files after a make/build). The original Code Insight parsed all files if there was an error in the code or in Code Insight itself.

      1. Linas

        Hope you will make it as soon as possible because for me it is highest priority. I think other developers are also waiting for this. Keep up the good work!

        1. Andreas Hausladen Post author

          Moving Code Insight into the background is a more complex task. I doubt that I will be doing it (for now). But what I have achieved is that the loaded units aren’t discarded every now and then. They are updated (even more exact than it was before) and the refresh time is marginal. Only the first invocation costs time.

  9. Eric

    Nice! I hope you’ll find a way to get this speedup to work in XE, if Code Insight was slow in previous versions, in XE it’s has become so slow that even manually invokations have become a big no-no.

    Code Insight has been so slow it was mostly a joke since its introduction (compared to similar functionality in Visual Studio, Eclipse, etc.).

  10. Mike P

    I REALLY, REALLY, REALLY, REALLY, REALLY need this! thank you for your work on this.

    problems like this (exacerbated by a long library path) have crippled my use of delphi for years.

Comments are closed.