On Sun, 1 Oct 2006, Alex Smirnov wrote:
> Peter Vreman
> >>> Sorry for that, but, I think you are not right. So, when I try to make
> >>> some compilation using make file - it will be more faster :-) - it will
> >>> NOT search system.ppu for 23 times. I can create make file for my
> >>> project and calculate the time needed to make all of it - both with
> >>> Lazarus IDE and with simple "make all"
> >>>
> >
> > There is a big difference with what the compiler needs to do and what you
> > want. See the 'my project' in your paragraph. This is not the case for the
> > compiler. The compiler needs to working in general for everybody. It can
> > be that this is maybe not the optimimal issue for your specific
> > situation.
> >
> >
> My situation is typical. I have typical and almost small project (658
> lines to compile). And it takes Lazarus 111 sec. to compile this 658
> lines! So it goes like 6 lines per second! :-) Extremely fast on my
> Pentium 2.8GHz with 2GB RAM!
> Also Lazarus tries to search something for 23669 times. And only for 383
> times with successful result!
> Thus I think that all this 111 seconds is almost wasting time that was
> spent in FindFirst/FindNext circle.
I agree that we should find something which can improve search speed -
but your 658 lines do depend on several hundreds of thousands of other
compiled lines of code. The compiler needs all this other code as well,
and it has to search for it.
Probably you can already improve the search a lot speed by ordering the
search path correctly.
What could be a possible solution is to have a cache in the compiler
where the compiler stores info about units it finds in each directory
on the search path. This would mean the compiler search mechanism would
have to be changed, though.
Something like (needs fixed font)
Find Unit X
Find unit filename in cache
file in cache ?
-> use filename.
not in cache ?
->For each dir in searchpath not yet searched
Collect all unit info for this dir, put in cache.
Unit in dir -> break
This would mean every directory in the path is scanned only once for
each invocation of the compiler. Contrary to what happens now, all files
in the directories would be scanned, though.
Michael.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives