Il 05/10/2011 20:37, Rudi Gaelzer ha scritto:

All right, I installed valgrind and ran it as per instructions.


When it finally opened the text, the process massif-amd64-li... was using 13.5%MEM and the demand was increasing very slowly without any operation on the text.


When I opened the Advanced Find and Replace panel, the memory required jumped to 14.6%, before I did any actual search.


When I went on to search for a mathematical symbol, the process was extremely slow (I guess this is normal?) and the used memory climbed to 36,6% before the first instance was located.


After locating about 12 instances of the symbol, the memory was at 38%.


Then I proceeded to search & replace operations. After about 6 such operations, the memory was at 39,9%. Closing the Advanced Find & Replace panel had no effect on the memory load.


I stoped the test there. See the enclosed massif file. Hope this is useful.


Hi,

thanks a lot for this. The only thing I can see here is a lot of allocations made by the boost regular expressions library, which is normal, as Find Advanced uses a lot that library for processing. Perhaps there's a memory leak bug in the particular version of the regex library that you're using ? I'm actually roaming in the dark.

I can only ask you to do a few more things:

1) easy thing: re-run the same experiment with valgrind, launching it as follows:

valgrind --tool=memcheck --leak-check=full ./src/lyx > valgrind-log.txt 2>&1

   (send over the obtained compressed valgrind-log.txt file)

2) try to recompile LyX from the sources, to check whether the problem still shows up on your system or not in the current trunk. Shortly (but it's going to take half an hour or so):

svn co svn://svn.lyx.org/lyx/lyx-devel/trunk lyx-trunk
cd lyx-trunk
./autogen.sh
./configure --prefix=/usr/local/lyx-trunk --enable-debug
make -j4
valgrind --tool=memcheck --leak-check=full ./src/lyx > valgrind-log.txt 2>&1

(I'm assuming you have a build environment with make, autoconf, automake, libqt-devel and probably other required packages already installed on your sytem).

LyX will run very very slowly (may boot up in ~30sec.) -- be patient.

Thanks, bye.

    T.

Reply via email to