Zitat von Graeme Geldenhuys <[EMAIL PROTECTED]>: > On 19/02/2008, Mattias Gärtner <[EMAIL PROTECTED]> wrote: > > > > Yes, and I already started something. The problem is, that Lazarus and FPC > comes > > with more than 130.000 identifiers (linux fpc 2.2.1) and that searching > takes > > Yikes!
Did I mention, that this is without packages? > > some time. The search time is mostly limited by the harddisk speed, so the > > first time the search can take a minute on slow systems. Of course the > second > > time the codetools finds the identifier in a second on recent systems. > > So, I was thinking about this: > > When the find declaration fails the IDE pops up a progress dialog with a > cancel > > button, running the code browsing to locate candidates. > > So the first attempt uses the uses clause? Second attempt will do the > search. Yes. The uses clause normally reaches only a few thousand identifiers. That's why it so fast. > I'm sure others will complain, but heres another though. :) What if > you do the search at Lazarus startup. After Lazarus started and loaded > it's first project, fire off a background thread (low priority) doing > the searching. While the developers starts finding his feet and starts > coding, Lazarus is collecting the lookup table (or whatever it needs) > in memory in the background. Realistically, by the time the developer > is looking for help on something, everything is already loaded. That > cache information could maybe even be saved to the hard drive so at > the next Lazarus startup the cache can be loaded from the hard drive > first, making the lookup loading even quicker. I did some tests and I think a identifier database has only one advantage: On slow and low memory systems. On recent computers the browsing is sufficient if done properly and boosted by a background pre loader thread. And the code browsing can be used for some more advanced tools, while the identifier database is specific to one task. So I will first improve the code browsing and maybe eventually a database plugin. > I guess some people would prefer to have the background search thread > as a toggle option in Environment dialog. Indeed. Mattias _______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
