Sign in Join

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

Mailing lists / fpc-pascal / 2012-02

fpdoc slow on Linux x64... tweaking?

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Reinier Olislagers

Running fpcup on Linux x86, Linux x64 with FPC fixes_2_6

Building LCL chm docs with build_lcl_docs, which calls fpdoc: On x86, seems to works ok.
On x64, takes a long time. fpdoc takes a huge amount of CPU (perhaps memory as well, haven't looked).

I suspect the reason the doc generation is slow is because of fpdoc.

Had a quick look at fpc trunk on Linux x64, problem seems to persist but it might be a lot better.... still, if possible, I'd like to offer users the possibility to run fixes 2.6...

The wiki
http://wiki.lazarus.freepascal.org/chm_backend_for_fpdoc does warn you about this:
"Warning: this script enabled all fpdoc bells and whistles, and before 28feb took 40mins to complete on a core2-6600. After the cleanup still 4minutes and 400MB memory. If you want to do this in a nightly build, make sure you have a fpdoc from trunk, preferably from a checkout that was compiled with optimization on. That knocks off another half minute. ( 12.5%)"

Questions:
1) Is it expected that the x64 version is much slower?
2) Is there anything else I can do to speed up LCL doc generation?
3) Optimize for speed probably is best, so recompile fpdoc with something like
cd ~/fpc
make fpdoc OPT="-O3"
fpc fpdoc.pp
Some optimistic (i.e. don't know what I'm doing exactly) browsing in FPC User's Guide gave:
-OaPARAM=VALUE
-OoREGVAR,OoSTACKFRAME,OoLOOPUNROLL,OoTAILREC
-Chxxx Reserves xxx bytes heap. xxx should be between 1024 and 67107840. -CPX=N Set the packing for X to N. X can be PACKSET, PACKENUM or PACKRECORD, and N can be a value of 1,2,4,8 or one of the keywords DEFAULT or NORMAL.
-Csxxx Set stack size to xxx.
-CX Create a smartlinked unit when writing a unit. -Xs strip

Are these useful (and at what values if so ;) ?
What about whole-program optimization?

Thanks,
Reinier

Reply by email

Graeme Geldenhuys
to Reinier Olislagers
Reinier Olislagers wrote
2) Is there anything else I can do to speed up LCL doc generation?

You are building CHM help, correct? If so, from recent messages in the FPC and Lazarus mailing lists, that is your problem, not fpdoc per-se. The CHM generation package is very very slow and very memory hungry.

I can generate full LCL docs in IPF output format (the source format used to generate INF help files) using fpdoc, in 4 seconds. So it is definitely not fpdoc to blame.

------------------------------------------------
$cd /opt/lazarus/docs/html/

$ time ./build_ipf.sh
FPDoc - Free Pascal Documentation Tool
Version 2.5.1 [2011/10/20]
(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther,

Done.

real 0m4.822s
user 0m2.030s
sys 0m2.810s

$ ls -l lcl/lcl.ipf
-rw-r--r-- 1 graemeg graemeg 9929628 2012-02-22 10:04 lcl/lcl.ipf

------------------------------------------------

Regards,   - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net

Reply by email

Reinier Olislagers
to Graeme Geldenhuys
Graeme Geldenhuys wrote 6 lines
On 22 February 2012 09:49, Reinier Olislagers wrote: > 2) Is there anything else I can do to speed up LCL doc generation? You are building CHM help, correct? If so, from recent messages in the FPC and Lazarus mailing lists, that is your problem, not fpdoc per-se. The CHM generation package is very very slow and very memory hungry.

Yep, seems that way.

I can generate full LCL docs in IPF output format (the source format used to generate INF help files) using fpdoc, in 4 seconds. So it is definitely not fpdoc to blame.

Well... not fpdoc itself, no, agreed ;)

Who knows, perhaps we'll extend fpcup to include ipf generation and the install the inf viewer... ;)

In order to be ready for that, would you care to share your build_ipf.sh?

Regards,
Reinier

Reply by email

Graeme Geldenhuys
to Reinier Olislagers
Reinier Olislagers wrote
In order to be ready for that, would you care to share your build_ipf.sh?

No problem, there is nothing special about it really. Just and inclusion of two parameters I don't have to keep retyping. :) It must be run from the <lazarus>/docs/html/ directory.

I haven't followed the recent conversations about the LCL docs restructuring etc. But the generated output from my script seems to include all the relevant LCL docs.

Regards,   - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net

Reply by email