
Hello, I don't really know how to phrase this, on one hand it may sound like I am whining and on the other it's a real issue I experience. If this should be in another list or posted as a bug report, just yell.
I think I'll just jump in.
The thing : Inkscape 0.45 gets gradually slower and less responsive over a period of time.
My system : Old AMD Athlon 1Ghz, 1 Gig RAM, Ample drive space (IDE), Nvidia something or other card, Kubuntu Dapper.
The caveat : For some reason or other I have the very real (and seemingly unique) experience with GTK apps all running very slowly -- well the gui response makes them appear to be slow. Apps like Firefox and OOO and Gimp and wxPython stuff and Tomboy, etc, are all painful. Still, I am used to that basic sluggishness.
I have been using Inkscape quite a lot in the last week doing icons and other designs and for the first ten minutes or so it's allright. Even fairly complex drawings (stuff all over, many layers, some bitmaps) are not a problem. After that, the refresh rate begins to slow. After about half an hour, it's in the order of seconds, not milliseconds. It's like move 1, 2, 3, 4, 5, 6 re-draw, with big black squares gradually filling-in. I have found that I cannot leave tool dialogs open -- especially the fill/outline one. I must open one, use it and then close or shade it and move it off the canvas area.
After 30 mins to 1 hour Inkscape really becomes impossible to use. I cannot select a single node without a long pause as the mouse freezes and then suddenly jumps into life (dragging the node radically). At this point I save my work and close the app. I wait for a couple of minutes and re-start it. All is well for a while. Repeat.
BTW - what I am describing is not an illusion of slowness, it really does get slower.
Oh yeah, one more thing, when I close Firefox it seems to give Ink a boost in speed but it does not last.
So, what's going on? Am I running some processes or other apps that are known to interfere with Inkscape? Is it more of a GTK thing? Is my AMD chip a known culprit? Is my RAM bad perhaps? How can I profile this so the stats are more useful to the coders of Inkscape?
Okay, thanks for reading, Donn.

On Thu, Feb 15, 2007 at 10:08:52PM +0200, Donn wrote:
So, what's going on?
Your system specs and software load look very typical and similar to what many of the rest of us use, but we definitely don't see the symptoms you describe, so that is very atypical.
Most likely, there is a fundamental problem that has nothing to do with Inkscape, and Inkscape is just suffering more noticeably than other things. So, I doubt we'll be able to help you solve it, but maybe we can nudge you in the right direction. At least I can help give some tools that you can use to help get a better idea of what might be wrong.
First, a few of your questions are easy to answer, given that you're seeing the slowness with many different applications:
Am I running some processes or other apps that are known to interfere with Inkscape?
Likely no; we know of no processes that directly interfere with Inkscape on a Linux-based system. It is possible a process could be hogging resources, but that's not going to be Inkscape-specific; it'd affect everything.
Is it more of a GTK thing?
No, not if you also experience the issue with non-Gtk things like Firefox, wxPython, and OOO.
Is my AMD chip a known culprit?
Unlikely, but possible. I've run into one CPU hotplug bug on an AMD chip (caused a system crash) due to a buggy chip, and of course there are various known issues with the nvidia binary driver and various X11 level things, that crop up when you have some advanced nvidia features turned on. It's doubtful any of those problems would cause the behavior you're seeing, though.
Is my RAM bad perhaps?
Also unlikely but possible. You could check it by rebooting your computer and make sure your BIOS does a memory check on it, and then also run 'memcheck' (Ubuntu LiveCD's have this) to be sure.
How can I profile this so the stats are more useful to the coders of Inkscape?
Well, since you're experiencing similar issues with apps other than Inkscape, it's more likely due to something much lower level than Inkscape, and it's extremely unlikely we'd be able to give you much help, other than pointing you in a better direction.
There are basically four possibilities here: * Application level issue causing resource exhaustion * Xorg level issue * Kernel level issue * Hardware issue
First, open a terminal and run `top`. Press 'i' to ignore non-active processes. Watch the memory and CPU loads while you recreate the problem. Do you spot one process that is eating up all the memory or CPU (like consuming more than 20%?) Try doing a 'kill -9 $pid' on that process ID and see if the system returns to responsiveness. If so, then report the bug to whatever project maintains that application (or to KUbuntu). Other useful programs for investigation of processes are ps, pstree, etc.
Second, one thing that sometimes happens in a system with overloaded memory is that it switches to swap memory, which is actually using space from your hard drive. Hard drives are **much** slower than memory, so especially with an older, slower IDE drive (or a slow IO connector on your motherboard), it could cause a situation like you describe. One way to test if this is happening is to unmount your swap space, and then recreate the issue; instead of swapping, the OOM Killer ("Out Of Memory Killer") will get triggered. Note that this will probably lock up your system and terminate some programs (maybe all of them!) so be prepared for a massive crash and don't have any important work unsaved.
Third, look at the last 20-50 lines of /var/log/messages (and/or other log files in /var/log) to see if there are any unusual error messages, kernel BUGs, PANICs, services crashing, etc. etc. If you find something, trace it back to the first obvious error message. Then that is the clue that'll get you on the right track for troubleshooting.
Finally, if none of the above proves fruitful, it might be a hardware issue. In this case, I would start swapping out pieces of hardware one by one and try recreating the problem. Being systematic here is important, so just do one hardware change at a time. If memtest passes without issue, it's unlikely to be RAM, but if you have extra RAM handy, that would be an easy first thing to test, so you can rule it out. You might also want to give a good overview of your BIOS and anything it reports for anomalies - temperature, voltages, etc.
From here, as you discover error messages or problems, do searches via
google to find others reporting that same error message, or that have the same hardware. Look for commonalities with your system. Maybe it boils down to a driver issue, and you need to update or change a driver. Maybe it's a bug in the kernel, so a kernel upgrade will solve it. Maybe it's a BIOS issue, and you can install a hotfix from your motherboard manufacturer. Or something else...
Anyway, I hope this all helps. Like I said, my bet is that it's nothing particular to Inkscape, however if in diagnosing this you do find Inkscape is at fault (such as if Inkscape is the culprit that's consuming all your resources), then please let us know via the bug tracker. Be sure to check if someone else has reported it already. Attach snippets from log files, output from tools like 'ps aux'/'free'/'lspci', and any other info that might help in tracking it down.
Good luck, Bryce

Thanks for the helpful response, I have a shortlist of about 5 things to try now and I'll see how it goes.
First, a few of your questions are easy to answer, given that you're seeing the slowness with many different applications:
Just to clarify, the slowness of GTK in general is one thing. The slowing down of Inkscape is more drastic. I would put it on another level of problem. I cannot continue using it after about an hour and must restart, no other apps behave that way.
This is quite interesting. I thought Firefox used GTK to draw its gui. It sure don't use QT. wxPython definitely does use GTK and Tomboy uses mono which uses GTK. OOO is anyone's guess :)
The common culprit I would say is GTK. KDE apps give me no trouble at all. They are quick and clean. GTK apps on the other hand ...
Thanks again, Donn.

On 2/15/07, Donn <donn.ingle@...155...> wrote:
The thing : Inkscape 0.45 gets gradually slower and less responsive over a period of time.
I've been trying to diagnose a similar (but different) performance problem lately on my machine. In my case the system (particularly GTK apps) are agonizingly slow every 3rd or 4th time I boot up. It's completely random, no software changes, no hardware or peripheral changes but every 3rd or 4th time I boot up everything runs slowly.
I have found a couple of very small differences in my /var/log/Xorg.0.log files from fast to slow boots, but nothing that provides an earth shattering difference. I've been having this problem for months now.
One thing that was mentioned to me in the many threads I've started on ubuntuforums.org to try and solve the problem is that performance degradation over time (during the same session) can sometimes be attributed to a memory leak. This is likely not attributable to Inkscape but possibly to some other application or driver. Have you changed/installed anything that made the problem start happening?

Well, as much as I hate to hear anyone suffering, I am glad that *someone* has experienced something of the GTK slowdown I have! Mine is all the time though.
How would I trap a memory leak? Is there some kind of logging software I can run that will decide this issue? Bryce has given me a list of things to try, but perhaps there's something more specific to memory leaks.
No. Really. I have had this same machine for about +-8 years. The m/b is about 3 now cos lightning had a talk to the last one. It's the same CPU. 512K of my RAM is about the same age, the rest is about 1 or 2 years old. This same machine with the same IDE cables has run everything from Win 2000 and XP to Fedora 1, Fedora 3 and Ubuntu Hoary and now Kubuntu Dapper.
Every time I ran anything to do with GTK it was slow. Always, without exception. KDE quickly became my favourite because, frankly, I had no real alternative. (Ubuntu Hoary didn't last as it was Gnome.)
I have asked about this over the years and I mostly get "shutup you are tripping" kinda responses. *shrug* I pretty much put it down to my AMD chip and the binaries out there being i386.
The many versions of Linux over the last few years is chiefly what makes me think it's not a certain driver or version of anything, but I'm really no expert.
The next thing I want to try, but time (and nerve) has delayed me, is to compile Ink 0.45 on my machine and see what I experience. I suppose if it's a GTK problem then I should compile that too! Argh.
/d

On Thu, Feb 15, 2007 at 11:11:14PM +0200, Donn wrote:
'top' will reveal this - I don't remember if I mentioned memory leak explicitly, but that's exactly what my first suggestion is aimed at determining. Run top and look at the memory %'s of apps over time. If one keeps growing and growing, then a memory leak is likely.
If you want a more hard core way of investigating memory leaks, 'valgrind' is a good tool for that. However, it may take a while to learn how to use it properly. (It'd be great to see more people using valgrind against Inkscape in general.)
Mismatched memory can also be a culprit sometimes; try taking out the older memory chip(s) and running with less memory, and see if that makes the system work fast.
Bryce

On 2/15/07, Donn <donn.ingle@...155...> wrote:
BTW - what I am describing is not an illusion of slowness, it really does get slower.
Does it get slower if you just run it and leave running? Or only if you are doing any editing?
Did you look at Help > About memory and how it's changing with time?

Does it get slower if you just run it and leave running? Or only if you are doing any editing?
I confess I have not simply left it. I will start it tonight when I go to bed (in about 5 minutes :D)
Did you look at Help > About memory and how it's changing with time?
I have yes, I want a -h flag for that dialog like the -h in du :) I don't process byte values very well and they change so quickly! What should I look for? Is there a way to log those values?
Oh - I recall another thing. When it starts getting really slow, dialogs that are opened (I saw this on the page settings and inkscape settings) are displayed blank. After literally minutes the widgets begin to draw onto the form, but they are all messed-up. I usually grab an edge and jiggle the form and then wait for it to redraw (a long wait). After this happened twice I took to just restarting the app.
Thanks, /d

On Thu, Feb 15, 2007 at 11:18:40PM +0200, Donn wrote:
That really sounds like a memory leak. As an application starts to use more memory, bits of it get swapped out to the harddrive. When you then try to access those bits, it then has to load from the drive rather than memory, giving you the effects you describe. top is definitely your friend here.
Jeff

Does it get slower if you just run it and leave running? Or only if you are doing any editing?
Okay - I left it running last night. I drew a freehand scribble and went to bed. This morning it is no slower -- all seems fine. I opened the two settings dialogs and there was nothing untoward.
Did you look at Help > About memory and how it's changing with time?
I wrote down the figures last night and this morning. I wrote down std malloc() In use and Slack and libgc and combined, not the Total column. XXX stands for rapidly changing numbers.
@23:38PM 15 Feb 45,374,xxx | 82,xxx 8,437,760 | 241,664 53,808,xxx | 326,xxx
@9AM 16 Feb 45,406,xxx | 49,xxx libgc the same 53,841,xxx | 293,xxx
hth /d
participants (6)
-
Bryce Harrington
-
bulia byak
-
Donn
-
Jeffrey Brent McBeth
-
MenTaLguY
-
Richard Querin