Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » LineEdit, EditFields, DocEdit » How to do fast Append & scroll in LineEdit with MT?
Re: How to do fast Append & scroll in LineEdit with MT? [message #45692 is a reply to message #45679] Tue, 22 December 2015 14:03 Go to previous messageGo to previous message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Didier wrote on Mon, 21 December 2015 20:15
Hi cbporter,

I may be wrong, but It looks like you are trying to display every single update while you also want quick display.
Maybe you should disconnect display frequency from update frequency by appending all text adds in between two displays in one big text update (if this is possible with you're needs of corse)

I did something close to this when managing undo stack in my GraphCtrl : when doing quick zooming or panning (less than 300ms in between two actions), I append all actions in order to make one final undo action.

Hope this helps

Hi Didier,

Sure, the final solution will probably cache the updates and only call it every N ms, but it still does not hurt to investigate the overall performance. Here is some valuable findings: they way TheIDE does it is 4+ times slower than my old solution.

And quite honestly, the performance of LineEdit is downright random. As an example, this is the shortest solution I found:

edtPane.Insert(edtPane.Total(), str); // I added a test getter for total


This executes in 1.4 seconds.

But this:
edtPane.Insert(edtPane.Total(), str);
edtPane.ScrollEnd();


Executes in 300 ms. Without any caching. And has the advantage of scrolling the LineEdit to the end. This solution is 36 times faster than the one inspired from TheIDE/Console.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: What do you think about this approach to making CodeEditor more user extendable?
Next Topic: NotNull can be fooled
Goto Forum:
  


Current Time: Sun Apr 28 08:08:03 CEST 2024

Total time taken to generate the page: 0.98726 seconds