[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
https://youtu.be/bW8OPO0HU3M
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>
Re: software runs late after compilation
Re: software runs late after compilation
Quote:
Originally Posted by
wqweto
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
Re: software runs late after compilation
Quote:
Originally Posted by
yereverluvinuncleber
I bet he uses Avast...
No, it is not Avast
I use Advanced SystemCare Ultimate software
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
https://youtu.be/aGl7j8vd1Z8
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.
Re: software runs late after compilation
Quote:
Originally Posted by
Mojtaba
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:
https://www.vbforums.com/images/ieimages/2025/01/18.png
cheers,
</wqw>
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.
Re: [RESOLVED] software runs late after compilation
Quote:
Originally Posted by
yereverluvinuncleber
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.
Re: [RESOLVED] software runs late after compilation
Quote:
Originally Posted by
yereverluvinuncleber
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
1 Attachment(s)
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
Re: [RESOLVED] software runs late after compilation
Does your application need all those fonts or do you just have them for some other reason?
Re: [RESOLVED] software runs late after compilation
Quote:
Originally Posted by
Arnoutdv
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
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.