Re: Nautilus property dialog refresh bounding patch -- not good
- From: Alexander Larsson <alexl redhat com>
- To: Mathieu Lacage <mathieu_lacage myrealbox com>
- Cc: nautilus-list gnome org
- Subject: Re: Nautilus property dialog refresh bounding patch -- not good
- Date: 12 Sep 2003 11:10:59 +0200
On Fri, 2003-09-12 at 10:16, Mathieu Lacage wrote:
> hi all,
>
> The attached patch implements a timeout-base refresh of the property
> dialog which should make the dialog a bit more responsive when changing
> the permissions of a group of files.
>
> I am very little convinced about the usefulness of the patch: the update
> functions in the property dialog are horribly inefficient and bounding
> the number of times they can be called per second with a timeout is not
> the solution. If you disable completely the timeout (remove the
> g_timeout_add in the schedule function), you will notice that changing
> the permissions of a group of files (around 40) is almost instantaneous
> which shows what a scary burden these update functions put on the
> machine.
There are some issues with this patch.
deep_count_started seem to never get set back to FALSE, meaning it will
continue to call directory_contents_value_field_update.
The way the rate limiting is done means the timeout function will keep
being called all the time even when there are no changes happening.
Thats not good. What we want to do is, whenever something changes we
call schedule_timeout, which schedules a timeout if there isn't one
already, and the timeout runs only once.
The way update_contents_callback() works is just way to slow. Calling
properties_window_update() for each changed file is a O(n^2)
operation[1], since properties_window_update() loops through all the
files in the dialog. properties_window_update() has to be changed to
take a list of changed files so it does things that loop over all files
only once.
[1] Well, its really O(m*n) where m is the number of changed files and n
is the number of files in the dialog. But in this case m ~= n, so its
basically O(n^2).
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a fast talking misogynist grifter with a passion for fast cars. She's a
chain-smoking hip-hop angel on her way to prison for a murder she didn't
commit. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]