Results 1 to 15 of 15

Thread: [RESOLVED] software runs late after compilation

  1. #1

    Thread Starter
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    218

    Resolved [RESOLVED] software runs late after compilation

    Hello friends, I have a strange problem, I use LabelPlus control
    When I run the software in vb6, it runs fast, but when I get the output and run it, it takes a long time to run.
    Interestingly, when I test the same program in the same system and other windows, it runs quickly!
    This problem is specific to this LabelPlus control, and other programs compile and run quickly
    Watch the movie . . .

    LabelPlus control


  2. #2
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,784

    Re: software runs late after compilation

    Turn off your AntiVirus (or better add your working directory where you regularly compile test projects to its exception list) and test again.

    cheers,
    </wqw>

  3. #3
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,932

    Re: software runs late after compilation

    I bet he uses Avast...
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  4. #4

    Thread Starter
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    218

    Re: software runs late after compilation

    Quote Originally Posted by wqweto View Post
    Turn off your AntiVirus (or better add your working directory where you regularly compile test projects to its exception list) and test again.

    cheers,
    </wqw>
    The first thing I thought of was the antivirus, but the problem is not the antivirus
    I completely disabled the antivirus and even deleted it.
    Cleaner Windows with Windows Optimer and Cleer software
    I updated the dlls like gdiplus.dll|
    The problem was not solved

  5. #5

    Thread Starter
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    218

    Re: software runs late after compilation

    Quote Originally Posted by yereverluvinuncleber View Post
    I bet he uses Avast...
    No, it is not Avast
    I use Advanced SystemCare Ultimate software

  6. #6

    Thread Starter
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    218

    Resolved Re: software runs late after compilation

    I found the problem : Due to the installation of many fonts
    I realized that all programs using GDI+ need to cache system fonts every time they run.
    And this causes the software to run late

    Solution:

    1 - Many fonts should be deleted, but this is not a wise action on the customers' systems.
    2 - The project should be limited to only the fonts that are needed, not all system fonts.
    If there is a better solution, please share

    I deleted many fonts
    See the result of loading the program in the video


  7. #7
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,932

    Re: [RESOLVED] software runs late after compilation

    Deletion of fonts was once a factor on older machines that were significantly slower. Faster machines these seem to have negated that problem.

    How many fonts did the system have? I have a GDI+app but the system has a mere 109 fonts installed.

    If you add/load the fonts back in again, does the GDI+ app start to slow down again? you might need to do this to prove your theory.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  8. #8
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,784

    Re: software runs late after compilation

    Quote Originally Posted by Mojtaba View Post
    2 - The project should be limited to only the fonts that are needed, not all system fonts.
    When is this not always the case? Why would anyone load *all* system fonts in their app?

    Might be a combobox for font selection which features a font preview like in WinWord:



    cheers,
    </wqw>

  9. #9
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,932

    Re: [RESOLVED] software runs late after compilation

    He seems to imply that just having a lot of fonts on the system slows down any GDI+ app, then he briefly states that a GDI+ project should not load all system fonts... Why would you load all system fonts?

    I don't know what is going on here.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  10. #10

    Thread Starter
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    218

    Re: [RESOLVED] software runs late after compilation

    Quote Originally Posted by yereverluvinuncleber View Post
    Deletion of fonts was once a factor on older machines that were significantly slower. Faster machines these seem to have negated that problem.

    How many fonts did the system have? I have a GDI+app but the system has a mere 109 fonts installed.

    If you add/load the fonts back in again, does the GDI+ app start to slow down again? you might need to do this to prove your theory.
    In my opinion, there is no difference between the old and the new system. I tested it on multiple Windows and 2 advanced systems
    All software that uses GDI+ caches all Windows fonts in one file.
    The larger the number of fonts, the longer the caching time and, as a result, the longer the program's execution time
    I design and I need a lot of fonts, I have almost 1500 fonts
    To prove your theory, if you watch the previous two videos, you will understand
    If you want to understand it more, I will make a new video and tell you where the GDI+ save files are stored at runtime and more information.

  11. #11

    Thread Starter
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    218

    Re: [RESOLVED] software runs late after compilation

    Quote Originally Posted by yereverluvinuncleber View Post
    He seems to imply that just having a lot of fonts on the system slows down any GDI+ app, then he briefly states that a GDI+ project should not load all system fonts... Why would you load all system fonts?

    I don't know what is going on here.
    Yes, this is exactly the main problem
    Fonts should not be cached every time when running GDI+ software

  12. #12

    Thread Starter
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    218

    Re: [RESOLVED] software runs late after compilation

    wqweto & yereverluvinuncleber

    Because you are following this discussion
    Let's do a hands-on project together to understand the topic better
    I have included a sample gdi+ project, first compile and run it without installing fonts
    I also put a collection of fonts, new and useful 600 fonts 20 MB
    Install the fonts
    Now run the software again
    Note: Run the software outside of VB6

    Font package
    Attached Files Attached Files

  13. #13
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    6,432

    Re: [RESOLVED] software runs late after compilation

    Does your application need all those fonts or do you just have them for some other reason?

  14. #14

    Thread Starter
    Addicted Member Mojtaba's Avatar
    Join Date
    Dec 2020
    Posts
    218

    Re: [RESOLVED] software runs late after compilation

    Quote Originally Posted by Arnoutdv View Post
    Does your application need all those fonts or do you just have them for some other reason?
    The thing is that I don't use any of the fonts installed in Windows in the project and I don't need them.
    But the program loads slowly due to the installation of many fonts
    Problem gdi+ caches system fonts every time the program is run

  15. #15
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,932

    Re: [RESOLVED] software runs late after compilation

    FYI - my old system, i7 6700 with 109 fonts loaded runs your GDI+ test program instantly. I don't have a test system with hundreds/thousands of fonts loaded so I cannot test further. If there is anyone else out there who has a test system where they would be happy to load fonts in quantity then please feel free to provide your results.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width