Slow Graph Generation

Linas Vepstas linas@linas.org
Wed, 1 Aug 2001 11:31:05 -0500


On Tue, Jul 31, 2001 at 08:09:24PM -0400, John Bafford was heard to remark:
> Hi,
> 
> I recently upgraded to GnuCash 1.6.1, and except for one problem, 
> it's a nice improvment on 1.4.x.
> 
> Whenever I have it generate graphs, it always takes at least a 
> minute. Neither gnucash or any of the processes it spawns to draw the 
> charts are using much CPU time; an strace shows that gnucash opens 
> /dev/random, reads four bytes, closes it, and then does time(), 
> getpid(), getppid(), and time() again, until it eventually draws the 
> graph.  The other processes are usually either doing a wait() or a 
> pause().

Where is the main process 'hanging'?  is it waiting during the read of
/dev/random ? If so, then the entropy pool has emptied; you can fill it
again by moving the mouse or generating network traffic.

If its hanging elsewhere, I wonder where ... 

> Is this a known bug, or is there something bad about my setup that I can fix?

Its come up on the mailing list, but the developers aren't able to
reproduce it.

How well do you know gdb?  If you could run gdb gnucash, and hit 
^C at the point where it hangs.  Then send us the stack trace for 
the main process and each thread ...

# gdb gnucash
(gdb) run
(hit control-C)
(gdb) where

I wasn't aware that guppi, the charting component, was multi-threaded. 
If you have the thread-ids (should be process ids, ps ax |grep gnucash)
then use the gdb 'thread' command to switch threads, and do a 'where'
for each of them as well.

--linas

-- 
I'm very PUBLIC-MINDED, I'm helping a NIGERIAN get his $25,000,000 back!