[fpc-pascal] fpdoc slow on Linux x64... tweaking?
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 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpdoc slow on Linux x64... tweaking?
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. 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, s...@freepascal.org Done. real0m4.822s user0m2.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 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpdoc slow on Linux x64... tweaking?
On 22-2-2012 9:16, Graeme Geldenhuys wrote: > 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 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpdoc slow on Linux x64... tweaking?
On 22 February 2012 11:38, 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 /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 build_ipf.sh Description: Bourne shell script ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal