[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[be] Re: bibledit-git polling
From: |
Dan Dennison |
Subject: |
[be] Re: bibledit-git polling |
Date: |
Wed, 28 Jan 2009 19:15:03 -0800 |
Another follow-up on this..
I changed the g_usleep interval from 100 to 10000 and bibledit-git no
longer polls on Windows!
while ((method_called_type != method) && (time(0) <= (oldtime +
timeout))) {
g_usleep(10000);
}
Thoughts?
dan :)
On Jan 28, 2009, at 6:43 PM, Dan Dennison wrote:
On Jan 28, 2009, at 4:53 PM, Dan Dennison wrote:
I built bibledit-git using the '-pg' option. This results in gprof-
style outputs.
I need to double-check this on Windows, but it seems to me off-hand
that this loop is going to be CPU-expensive regardless of platform.
bibledit-git is so expensive CPU-wise on Windows right now that
it's hard to recommend for laptop users.
See my gprof output for details, but
InterprocessCommunication::receive() is the most expensive function
on Win32, with a tie between vector manipulations (likely from
InterprocessCommunication::get_payload()), and g_usleep().
It seems that every call to g_usleep is invoking a thread. I think
perhaps thread spawns are much slower on Win32, and thus the CPU
slamming.
GProf output is at https://thedennisons.org/~dand/bibledit-git-
gprof.txt.gz
Thoughts?
dan :)