IDE version:      Lazarus 0.9.18 (fresh installation)
OS:                     Windows XP and  Linux(Mandriva 2006) - same problem.

Problem description: While Lazarus tries to compile something, it starts to search for several files - PPUs, Libraries, source files, etc.But IMHO, it searches things in a wrong (not optimal) way. And as a result it spends more then 99% of compilation time in this searching process.

Here is the example:

"(SYSTEM)   Loading unit SYSTEM
Unitsearch: System.ppu
...
Unitsearch: System.pp
Searching file System.pp... not found
...
Unitsearch: System.pas
Searching file System.pas... not found
...
Unitsearch: System.ppu
Searching file System.ppu... not found
...
...
Unitsearch: C:\lazarus\fpc\2.0.4\units\i386-win32\rtl\System.ppu
Searching file C:\lazarus\fpc\2.0.4\units\i386-win32\rtl\System.ppu... found
"

SYSTEM.PPU is a basic unit. But Lazarus first tries to find file "System.pp" in the project root directory! And it takes Lazarus 23 attempts (!!!) ONLY to find System.ppu. More over, every time I will build the same project - Lazarus will spend 23 attempts to find System.ppu.

First of all I think, it should be a list of system modules(libraries) to find them every time in the same place. If this is a compiler issue - we should put system units search path at the top of unit search list.
Next, I think it is a good idea to store some search results in project file (like "Project.lpi") 
to speedup the compilation process. I mean that all *.PPU/*.PAS/*.PP/*.A etc files that are parts of a project should be stored in "Project.lpi" with full path. So compiler will try to search them ONLY when they will be not found with this stored paths.

Regards, Alexey.
 

Reply via email to