Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2008-06

(patch) performance fix

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sergei Gorelkin

Hello,

verbose.UpdateStatus is being called after each line compiled. In turn, it calls fmodule.get_module which does linear search in the list of loaded modules. The effect is not noticeable while compiling individual units, but on huge projects it ends up eating quite a number of CPU cycles.

This can be fixed by changing the order of checks (see the patch attached).

Best regards,
Sergei

Reply by email

Florian Klaempfl
to Sergei Gorelkin
Show quoted text 8 lines
Hello, verbose.UpdateStatus is being called after each line compiled. In turn, it calls fmodule.get_module which does linear search in the list of loaded modules. The effect is not noticeable while compiling individual units, but on huge projects it ends up eating quite a number of CPU cycles. This can be fixed by changing the order of checks (see the patch attached).

Applied, thanks.

Reply by email