Possible fix for BUG#375687

View: New views
3 Messages — Rating Filter:   Alert me  

Possible fix for BUG#375687

by Iivari Mokelainen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey!

quote from bugzilla: "Tomboy is slow for typing text, especially with notes that have already lots of words in them." (#375687)

Since 'a change' to the text is a single insertion (be it a character or a whole sentce by pasting), we could add a timer for acting on insertion.

Old behaviour:
user typed 's'
all listeners for events are called
user typed 'l'
all listeners for events are called
...


proposed behaviour :
user typed 'f'
a timer is set to call all the listeners in N ms
user typed 'a'
the timer is reset, eg the restarted to be called in N ms.
no input for N ms.
all listeners for events are called
...

with that when typing fast the timer will be reset each time, and only when user stops inserting text listeners are called.

could possible ease the situation with #507795, since if the leak is one of the listeners, it wont be called that many times.


_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Re: Possible fix for BUG#375687

by Sandy Armstrong :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Iivari,

This sounds like a good approach.  Care to work up a patch?  ;-)

Sandy

On Tue, Jul 21, 2009 at 5:41 AM, Iivari Mokelainen<iivari@...> wrote:

> Hey!
>
> quote from bugzilla: "Tomboy is slow for typing text, especially with notes
> that have already lots of words in them." (#375687)
>
> Since 'a change' to the text is a single insertion (be it a character or a
> whole sentce by pasting), we could add a timer for acting on insertion.
>
> Old behaviour:
> user typed 's'
> all listeners for events are called
> user typed 'l'
> all listeners for events are called
> ...
>
>
> proposed behaviour :
> user typed 'f'
> a timer is set to call all the listeners in N ms
> user typed 'a'
> the timer is reset, eg the restarted to be called in N ms.
> no input for N ms.
> all listeners for events are called
> ...
>
> with that when typing fast the timer will be reset each time, and only when
> user stops inserting text listeners are called.
>
> could possible ease the situation with #507795, since if the leak is one of
> the listeners, it wont be called that many times.
_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Parent Message unknown Re: Possible fix for BUG#375687

by Sandy Armstrong :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

(Don't forget to CC tomboy-list)

You might find this wiki page useful, then:

http://mono-project.com/Responsive_Applications

It details how to add idle handlers and timeouts to gtk# applications.

Best,
Sandy

On Tue, Jul 21, 2009 at 6:18 AM, Iivari Mokelainen<iivari@...> wrote:

> Well, even though i dont use tomboy, i would love to submit a patch for
> this.
>
> The problem is i haven't poked mono or gtk+ with a long sitck, and have no
> idea
> what to use for the timer. I could implement one with threads and sleep(),
> but that is not the way :)
>
> I will try and start by installing git and getting the source :)
>>
>> Hi Iivari,
>>
>> This sounds like a good approach.  Care to work up a patch?  ;-)
>>
>> Sandy
>>
>> On Tue, Jul 21, 2009 at 5:41 AM, Iivari Mokelainen<iivari@...>
>> wrote:
>>
>>>
>>> Hey!
>>>
>>> quote from bugzilla: "Tomboy is slow for typing text, especially with
>>> notes
>>> that have already lots of words in them." (#375687)
>>>
>>> Since 'a change' to the text is a single insertion (be it a character or
>>> a
>>> whole sentce by pasting), we could add a timer for acting on insertion.
>>>
>>> Old behaviour:
>>> user typed 's'
>>> all listeners for events are called
>>> user typed 'l'
>>> all listeners for events are called
>>> ...
>>>
>>>
>>> proposed behaviour :
>>> user typed 'f'
>>> a timer is set to call all the listeners in N ms
>>> user typed 'a'
>>> the timer is reset, eg the restarted to be called in N ms.
>>> no input for N ms.
>>> all listeners for events are called
>>> ...
>>>
>>> with that when typing fast the timer will be reset each time, and only
>>> when
>>> user stops inserting text listeners are called.
>>>
>>> could possible ease the situation with #507795, since if the leak is one
>>> of
>>> the listeners, it wont be called that many times.
>>>
>
>
>
_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com