Slow procedure

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #37506
    bswift
    Participant

    Hello all,

    I have a procedure that I have been using for 15 years in my prog. It does a customsort of two listboxes. It first loads a file with over 1500 strings in one listbox then sorts the listbox items putting a part of the string into one listbox with the complete string in the other. The index of each listboxs match for the partial string and the complete string. Typically it take about 1 second to run the loop. However, when I have the prog skinned it takes about 4 seconds. Is this because of the painting of the components??

    Any help appreciated.

    #56757
    Lasse
    Participant

    I have noticed similar slow down with my own editor control – basic text selection seems very sluggish. I used a sampling profiler and there seems to be a lot of FillRect32 calls in sAlphaGraph. This has not been noticeable before.

    I am using SkinManager.Options.OptimizingPriority = opSpeed.

    #56758
    Support
    Keymaster

    Hello!

    I think, it's slow because scrollbars are repainted after each item adding.

    Try to use these methods:

    Code:
    sListBox1.SkinData.BeginUpdate;
    …your code…
    sListBox1.SkinData.EndUpdate;

    If it's slow still, then give me a small demo, please.

    #56766
    Lasse
    Participant

    Thanks, atleast my problem is fixed. 🙂

    #56770
    bswift
    Participant

    Yes!! That has solved the problem. Went from 3758ms to 172ms. Thanks!!! Great Stuff.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.