Help on slow loading of the RTF editor

  • My customer has several PC workimg with my application, but one those PC is very slow loading my RTF editor form.
    I tested with WPMiniEditor.exe demo, and here are the results:

    WPMiniEditor.exe demo, Customer PC loading time: 18 seconds, My PC loading time: 3 seconds.

    My application, loading time for the RTF editor form, Customer PC loading time: 33 seconds, My PC: 2 seconds.
    My application, unoading time for the RTF editor form, Customer PC 25 seconds, My PC: 0 seconds.

    I looked at the fonts catalog, but there is no significative differences, Customer has 237 fonts, and in my PC there are 351 fonts.

    I am lost with this problem, so can anybody give me any clue on to diagnose what is happening,

    • Offizieller Beitrag

    Hi,

    I had this once, too. I expected the loop which enumerates the fonts was the cause for this and already wanted to pack it into a separate thread. But it was gone then and that loop takes just some mms. (It also only runs once)

    But I rather think it is a system setting thing. There is a service "Application Experience" / "Anwendungs Erfahrung" - if that service is *not* running the system behaves funny ( you get the error "cannot create output file" with Delphi). Please make sure that service is running.

    Julian

  • Further investigating, I see that the bootleneck is not at all in the loading of fonts, but in a message in TWPCustomRtfEdit.WndProc

    If you put a breakpoint in the event FormShow of WPMiniEditUnit1, then once stopped there put another breakpoint in TWPCustomRtfEdit.WndProc
    look for the 5 next events and in the 6 event of type 45063 is what is causing the bootleneck.

    As I do not have Windows SDK headers, I can not follow what the 45063 message is.

    • Offizieller Beitrag

    WPTools is using messages to format the text and update the GUI "when the app is idle".

    Formatting the text can issue all kind of system interaction, most importantly initializing the text = requesting front sizes from the OS. If the fonts are not cached that could cause a lag.

    Unfortunately I have no lag here to debug. Did you check that service?