Mattias Gaertner schrieb:
these values can be picked from and stored in the data structures
imported from the compiler. This would not necessarily make any speedup,
but could simplify the additional coding in the IDE.
What additional coding?
For the compiler options, that are not yet supported. And for the
options of your additional compilers, that may have different textual
encoding.
[file search]
I doubt that, because for backwards compatibility fpc has still to
search in the paths.
Only in the commandline version (fpc.exe).
That duplicate install suggests a shared library to me (.dll,.so), that
can be used by both Lazarus and a commandline front-end...
Correct me if I'm wrong: memory mapped files is a more direct access to
the OS file cache. You can omit the copy on loading and the copy-back
on writing.
Yes.
The IDE loads/saves files as whole with one TFileStream.Read/Write
call.
The related file buffers are subject to swapping, i.e. they may have to
be written to the swap file. MMFs deserve no such writes, except for
changed parts, since they can be reloaded from the original disk file or
cache.
The compiler is very concerned with memory usage, and uses small file
buffers for all files. When file handles are restricted resources, on
legacy platforms, the files are closed and re-opened frequently. AFAIR
buffer size of more than 64 KB did not bring any noticeable speedup,
most probably because most files are smaller.
I tried to measure the time of the copy:
The code browser loads under Linux fpc 2.5.1 about 87 MB of sources
and takes on this machine about 4.5 seconds.
I doubled the copy on load and it is still about 4.5 seconds.
I put the copy on load in a loop for 10 times and it is still about 4.5
seconds.
That's why I doubt that memory mapped files will give a noticeable speed
increase.
I have no practical experience with MMFs myself, but users reported
factors of 3 in reading files (Delphi/Win32). At least it would be worth
a try.
DoDi
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus