Re: Hamster hogs CPU for 2-3 seconds on modifications



Hi,

2010/12/22 Patryk Zawadzki <patrys pld-linux org>:
> 2010/12/22 Bjørn Forsman <bjorn forsman gmail com>:
>> Hi,
>>
>> First of all, thanks for hamster-applet! It is a great app and I use
>> it every day.
>>
>> But the reason for this email is that I recently started using it from
>> git master
>> branch and have noticed that every time I add/modify/remove entries,
>> hamster hogs the CPU for 2-3 seconds. The hamster I used previously
>> was stock Ubuntu 10.04 version and it was really responsive so this regression
>> is a bit of a bummer...
>>
>> Any ideas?
>>
>> BTW, just browsing the data ("Show overview") is quick: I can go from one
>> week to the next without any noticeable delay.
>
> If it only happens during data modification, I'd dig around sqlite3.

Ok.

> Do you have an unusually large hamster database? If not, are you sure
> it's because of CPU usage and not disk activity?

My hamster.db is 98 KiB. I don't know if that is "unusually" large or not
(I hope not!), but it definitely wasn't as slow on the hamster version in
ubuntu 10.04 with the exact same hamster.db.

I watched gnome-system-monitor for CPU activity and it spiked on every
hamster add/modify/delete operation. And it was not spiking because of
"waiting for IO". So yes, I am pretty sure it was the CPU.

> Does your sqlite call
> fsync() or sync() each time data is modified?

How do I know/figure that out?

Oh, I just now tested the same hamster.db on a ubuntu 10.10 machine
(with stock hamster version) and it isn't slow there. I'll have to
test some more.

Just to be clear, the slow hamster setup is Ubuntu 10.04 with
hamster-applet from git master.

Best regards,
Bjørn Forsman


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]