Zitat von Martin <laza...@mfriebe.de>:
Mattias Gärtner wrote:
Zitat von Vincent Snijders <vsnijd...@vodafonevast.nl>:
I like Florian's idea too. As for your statement above, how
often does this really happen? In the last 4-5 years that I have
been using FPC, the compiler has not once "crashed" on me. Yes
it might report that there is a compiler error in my project,
but I do not consider that a crash.
The compiler is started on every compile which is the cleanest
start you can get. A threaded compiler must have a restart, which
is less clean. There will be more crashes and bugs.
What happens if the restart fails?
For the debugger, we have reset debugger.
For the compiler, we would add a reset compiler option.
I meant, when the compiler is in another thread and the restart
fails, what should happen? You can only restart the IDE.
Just out of curiosity, what are we trying to solve?
How much benefit would a build in or preloaded fpc inside Lazarus
be? Most Operating System cache disk access. So once you used, it is
in memory, never mind if that memory belongs to lazarus, or the OS.
Of course another thread would solve issues with unresponsiveness.
But that could be done by having another thread, that runs the
external process. Or if the AsyncProcess worked, it could be done,
by using this + moving to an event-driven model.
Or am I missing some crucial point?
Well, the crucial points speak all against an internal compiler as thread.
But an internal compiler can have some benefits:
Access to the compiler structures may allow to find out, why a "unit
was not found". But I doubt that.
Access to the compiler structures may allow to do a find declaration
in ppu files. But reading ppu files is not a big problem. I already
started that in the codetools. The problem is to make the information
usable to the existing tools (identifier completion). And this is a
lot of work.
My conclusion:
Let's use an external compiler as Florian proposed and one day the
ppus don't need to be parsed on every compile. This should reduce the
compile time dramatically.
Mattias
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus