Hi
On Sun, 27 Mar 2011 14:15:45 +1100 Lex Trotman elextr@gmail.com wrote:
- geanyprj act only on "document-open", "document-save", "document-activate" callbacks
- geanyprj add a lot of TMWorkObject objects using tm_workspace_add_object() to Geany
And tm_workspace_add_object sets the parent to be the whole workspace!
Can something be done for this?
Because of item 2) above I think this will reparse all open files.
I don't think it is true. I used mantisbt project to test. Initially it takes few seconds to load the project (parse all files). Delay during typing is much less then second.
Anyway here is patch that make Geany don't parse tags when user is actively typing.
Le 27/03/2011 13:23, Yura Siamashka a écrit :
On Sun, 27 Mar 2011 14:15:45 +1100 Lex Trotman elextr@gmail.com wrote:
- geanyprj act only on "document-open", "document-save", "document-activate" callbacks
- geanyprj add a lot of TMWorkObject objects using tm_workspace_add_object() to Geany
And tm_workspace_add_object sets the parent to be the whole workspace!
Can something be done for this?
No idea -- I only barely know this part if the TagManager, sorry.
Because of item 2) above I think this will reparse all open files.
I don't think it is true. I used mantisbt project to test. Initially it takes few seconds to load the project (parse all files). Delay during typing is much less then second.
You are right, because updating the root workspace don't really update the child SourceFiles (because the force param is set to FALSE). Projects are maybe affected though (however, not sure where/when they are used).
Anyway here is patch that make Geany don't parse tags when user is actively typing.
I'm not sure about this patch, because it is then really easy to make the tag list never update automatically. E.g. if update timeout is set to 1s, just type something every 999ms and then update will never happen, even if there is actually 1s free to do it.
Are really the update making something unresponsive for you?
But maybe I'm worrying too much and this only need the timeout to be configured otherwise, I may try to tune this if you really think it's important.
I also plan to try to move the TagManager parsing in a separate thread at some point, maybe it'll help (though maybe it's the UI update that takes most of the time...). However, don't expect this to happen very soon, I'm a thread newbie so it's likely to take me time to get it working properly.
Cheers, Colomban
On Mon, 28 Mar 2011 23:00:54 +0200 Colomban Wendling lists.ban@herbesfolles.org wrote:
Anyway here is patch that make Geany don't parse tags when user is actively typing.
I'm not sure about this patch, because it is then really easy to make the tag list never update automatically. E.g. if update timeout is set to 1s, just type something every 999ms and then update will never happen, even if there is actually 1s free to do it.
Please show me that energeezer that type something every second and even have time to inspect tags while doing it. :) It is quite unrealistic to me. On other hand if someone is just typing parse delay can be annoying if his file is HUGE.
Are really the update making something unresponsive for you?
Actually I was happy with Geany performance even before any related changes, so it is not very important to me, but I think it can be usefull to topic starter.
But maybe I'm worrying too much and this only need the timeout to be configured otherwise, I may try to tune this if you really think it's important.
I also plan to try to move the TagManager parsing in a separate thread at some point, maybe it'll help (though maybe it's the UI update that takes most of the time...).
No, I suspected this first and disabled UI update during research (delay seemed the same), but maybe it is worth to make smart update. Parser report that some tags were actually changed and you call UI update only then (if it is not done already)
On 29 March 2011 08:29, Yura Siamashka yurand2@gmail.com wrote:
On Mon, 28 Mar 2011 23:00:54 +0200 Colomban Wendling lists.ban@herbesfolles.org wrote:
Anyway here is patch that make Geany don't parse tags when user is actively typing.
I'm not sure about this patch, because it is then really easy to make the tag list never update automatically. E.g. if update timeout is set to 1s, just type something every 999ms and then update will never happen, even if there is actually 1s free to do it.
Please show me that energeezer that type something every second and even have time to inspect tags while doing it. :) It is quite unrealistic to me. On other hand if someone is just typing parse delay can be annoying if his file is HUGE.
Are really the update making something unresponsive for you?
Actually I was happy with Geany performance even before any related changes, so it is not very important to me, but I think it can be usefull to topic starter.
But maybe I'm worrying too much and this only need the timeout to be configured otherwise, I may try to tune this if you really think it's important.
I also plan to try to move the TagManager parsing in a separate thread at some point, maybe it'll help (though maybe it's the UI update that takes most of the time...).
No, I suspected this first and disabled UI update during research (delay seemed the same), but maybe it is worth to make smart update. Parser report that some tags were actually changed and you call UI update only then (if it is not done already)
Seems to me that none of this answers the original question of why is the lag much greater when both Geanyprj and real-time update are in use, compared to the lag when only one of them is in use? If we could answer that then adding delays etc would be immaterial :-)
Cheers Lex
-- Yura Siamashka yurand2@gmail.com _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
Le 28/03/2011 23:46, Lex Trotman a écrit :
On 29 March 2011 08:29, Yura Siamashka yurand2@gmail.com wrote:
On Mon, 28 Mar 2011 23:00:54 +0200 Colomban Wendling lists.ban@herbesfolles.org wrote:
Anyway here is patch that make Geany don't parse tags when user is actively typing.
I'm not sure about this patch, because it is then really easy to make the tag list never update automatically. E.g. if update timeout is set to 1s, just type something every 999ms and then update will never happen, even if there is actually 1s free to do it.
Please show me that energeezer that type something every second and
even have time to inspect tags while doing it. :) It is quite unrealistic to me. On other hand if someone is just typing parse delay can be annoying if his file is HUGE.
Probably true, I'll test this a bit and see what I feel about it in real-world usage.
But maybe I'm worrying too much and this only need the timeout to be configured otherwise, I may try to tune this if you really think it's important.
I also plan to try to move the TagManager parsing in a separate thread at some point, maybe it'll help (though maybe it's the UI update that takes most of the time...).
No, I suspected this first and disabled UI update during research (delay
seemed the same), but maybe it is worth to make smart update. Parser report that some tags were actually changed and you call UI update only then (if it is not done already)
May be a possible trick. However we currently can't tell whether the symbol list changed, so it'd have to be an extra step.
Seems to me that none of this answers the original question of why is the lag much greater when both Geanyprj and real-time update are in use, compared to the lag when only one of them is in use?
Let's hope it's only the parent update that poses problems (and should then be fixed, hopefully without too much side effects), what seem a good explanation to me (and to Yura's tests IIRC).
If we could answer that then adding delays etc would be immaterial :-)
Well, parsing of very large files *is* slow (e.g. the update of a test file of ~64k lines of standard C code (9000+ tags) takes 1,6s -- including UI update though, which might be a significant part), so improving it probably can't be bad :)
Cheers, Colomban