Jump to content
MichaelG

Long application launch times with large number of fonts.

Recommended Posts

Dear Affinity Team,

First of all, congratulations on the release of Affinity Publisher V1. Great job! I am now running the official release and I'm looking forward to using it.

I did post a topic on this subject on the Affinity Publisher Beta forum. Things have improved somewhat since then, and my understanding of what is going on has improved too. However, I do feel there is still an underlying problem. I have done a considerable amount of research and testing, and I am sharing the results here. I have gone into as much detail as I can, and as a result this is quite a long post.

Problem Summary: With a large number of fonts installed on my computer, Affinity Publisher, and other Affinity apps too, take significantly longer to launch than other design apps.

System Details: Fujitsu Celsius workstation. Core i7, 6 Cores, 16Gb, SSD, Windows 10 Pro Version 1903, OS Build: 18362.207.

Fonts Installed: 4862.

Prior to performing any tests, the following actions were performed:

  • I performed a major cull of installed fonts, and removed several hundred since I performed this test on the beta release.
  • After the cull, the Windows font cache file was deleted. (C:\Windows\System32\FNTCACHE.DAT)
  • The Windows font management service was stopped.
  • The contents of the folder C:\Windows\ServiceProfiles\LocalService\Appdata\Local\FontCache were deleted.
  • All Adobe font cache files were deleted. (AdobeFntnn.Lst)
  • The computer was restarted.
  • Each application used in the test was launched once to allow any caches to be rebuilt.

The application launch times recorded were as follows:

Adobe InDesign CS6:               0:25
Serif PagePlus X9:                    0:08
Affinity Designer V1.7.1.404:  3:00
Affinity Photo V1.7.1.404:       3:20
Affinity Publisher V1.7.1.404: 3:10

In each case, I deemed the application launch to be complete when the welcome screen appeared. Each app was launched separately to avoid any risk of the apps interfering with each other. No other foreground apps were running other than Windows performance monitor and the stop watch app.

It can be seen that the Affinity apps have similar launch times to each other, and these are significantly longer than either PagePlus X9 or InDesign CS6. I believe the prolonged launch times for the Affinity apps is due to a font enumeration and/or font caching issue.

Application Readiness: As stated, when the welcome screen appeared I consider the application to be ready for use. However this is not the case with all apps.

  • For InDesign and PagePlus, as soon as the welcome screen appears I can create a new document, then create a text frame, and then select a font from the font selection drop down. In both cases, the font list was fully populated with font previews, and there was no perceptible delay in scrolling trough the font list.
  • However with Affinity Publisher (and Designer and Photo too) when the welcome screen appeared I could create a new document and create a text frame, but when I went to the font selection drop down, the font previews were not yet rendered. If I waited with the font drop down open, I could see the font previews slowly appear. (The apps opened with Arial as the default font, so the font list open with the fonts beginning with "A" visible).
  • Now if I tried to scroll through the font list, Publisher became unresponsive. However patience pays, and eventually the font previews progressed downwards through the list. Eventually all the previews were visible, and at that point I could scroll back and forth through the font list without any further problems. However, to completely render the font previews takes in the order of 12 minutes.
  • If I launched another app, such as MS Word, whilst the font selection drop down was open and the font previews were being rendered, then the font selection list would always be on top of MS Word. This continued until the font previews had been rendered.

Conclusion: Affinity Publisher (and other Affinity apps) is not fully ready to use when the welcome screen appears.

Background CPU Usage: After Affinity Publisher (and other Affinity apps) displays the welcome screen, it continues to consume approximately 4% to 6% of the CPU for a period of approximately 12 minutes. After this time, the background CPU usage drops off. If I launch Affinity Publisher and then wait for the CPU to become quiescent, I can then create a new document, create a text frame, and open the font selection list. Now all the font previews are present, and I can scroll back and forth through the list without any delay and without the app becoming unresponsive.

Conclusion: Only when the app gets to the welcome screen does it begin rendering font previews. On this machine with this number of fonts, this operation takes approximately 12 minutes. Only when this is done is the app fully ready for use. It is my belief that after Affinity Publisher is launched and the welcome screen is displayed, it then gets to work rendering the font previews. Moreover, it does this each time it is launched. There would not appear to be a persistent font cache.

Adobe Font Caches: The Adobe suite creates and maintains a number of font cache files in various locations. They usually have a names like AdobeFntnn.lst. As part of the preparation for this test I deleted all these files, and after a system restart they were all rebuilt. What builds them I don't know, but I believe these files play a key role in how fonts are managed with Adobe apps. However this does not explain why PagerPlus X9 doesn't suffer from any of these issues. It launches like lightning, and is ready to go as soon as the welcome screen appears, font previews and all. Go figure.

Summary: OK, that's about all I can tell you. This issue is an annoyance rather than a show stopper. It doesn't appear to prevent me from using the app, it just takes a while before it is fully ready to go.  But if I were using this app every day, I think it would quickly become tiresome.

The fact remains that InDesign CS6 is ready to go in 25 seconds, but Affinity Publisher takes just over three minutes to give me a start screen, and a further 12 minutes before it is fully ready to go. Therefore there is some work to do with font management and optimization I think. PagePlus manages very well however, and this is a Serif app. What is its secret I wonder?

If the development team would like any further information or clarification, please do not hesitate to ask.

Thanks again for a great value design suite. Please keep up the good work.

With Kind Regards,
Mike G.

 

Share this post


Link to post
Share on other sites

Update: 20th August 2019.

Same hardware as above — Core i7, 6 cores, 12 logical processors, 16Gb, SSD. Windows 10 Version 1903 Build 18362.295.
Affinity Publisher for Windows V1.7.2.471.
Number of fonts Installed: 4693.

I have some additional information on this issue if it helps the developers. Since my initial post I have had another font culling exercise and further reduced the number of installed fonts. The good news is that the "missing fonts" issue does seem to be fixed, so thanks to the team for that.

Although I am reporting this as a Publisher issue, exactly the same problem affects Designer and Photo too. All Affinity apps are at version 1.7.2.471 at the time of writing. The key times recorded for all apps is roughly the same to within a few seconds. I will therefore only give the timings for Publisher. (Time format is mm:ss). For the purposes of this post, I have broken down the launch process into phases.

  1. Phase 1: The application splash screen appears and displays the "Loading fonts..." message.
  2. Phase 2: The application splash screen disappears after 01:10. The main app windows pops up at this point. However the splash screen is still underneath the main window, but it does not show "Loading fonts…" message. The main window is not responsive at this time.
  3. Phase 3: The Welcome screen appears after 04:20. That is considerably longer that I recorded in my initial post with an earlier version of Publisher.
  4. Phase 4: Now it gets interesting. In my initial post I reported that the app uses approximately 12% of the CPU for several minutes after the welcome screen appears. In fact it uses 100% of one virtual processor. This PC has 6 cores and 12 virtual processors, so there is one compute bound thread taking 100% of one VCPU. This CPU usage continues for 19:20 after launch, so that's about 15 minutes of a maxed out VCPU after the Welcome screen is displayed. There is no significant disk I/O going on, and Microsoft Process Monitor doesn't show any registry activity. What on earth is going on here?

Just as before, if I create a new document as soon as the Welcome screen appears, then create a text frame, and then try and lay down some type, I initially have no font previews rendered in the font dropdown list. If I am patient and wait, I can see the font previews slowly appear in front of my eyes. If I scroll down a little way, the font previews gradually trickle down through the list of fonts from A to Z. After approximately 20 minutes after launch, all font previews are visible. I have only observed this behaviour with the three Affinity apps. If I close the app and launch it again, the same thing happens. Mighty tedious.

So much for the facts, now for the guesswork... This is an issue with FreeType, correct? Once the app is launched, FreeType gets to work to generate the font previews. Furthermore, FreeType is not multi-threaded. Nothing else I use makes use of FreeType, and that's why I only see it with Affinity apps.

I hope this helps to identify the problem, if indeed the developers consider it a problem? Please let me know if you need any further information.

Kind Regards,
Mike G.

 

Share this post


Link to post
Share on other sites
On 8/20/2019 at 4:10 PM, MichaelG said:

If I close the app and launch it again, the same thing happens. Mighty tedious

Thanks for the detailed post. Some kind of common and permanent (updatable) font cache is necessary, indeed. I wonder whether a third-party font manager and font auto-activation on demand would resolve the problem for Affinity apps?

I am currently using Affinity apps only on a laptop where I do not have a font manager installed, and have about 700 fonts installed, and can experience the same in smaller scale, but had not actually noticed the rebuild of font previews (or even a bit longish launch times), probably because there has not been any urge in using the apps in actual work projects.

Share this post


Link to post
Share on other sites
3 hours ago, Lagarto said:

I wonder whether a third-party font manager and font auto-activation on demand would resolve the problem for Affinity apps?

That is the common recommended approach for users who have a large number of fonts, and it does work, from what I've read in these forums.


-- Walt

Windows 10 Home, version 1903 (18362.239), 16GB memory, Intel Core i7-6700K @ 4.00Gz, GeForce GTX 970
Affinity Photo 1.7.2.471 and 1.7.3.476 Beta   / Affinity Designer 1.7.2.471 and 1.7.3.476 Beta  / Affinity Publisher 1.7.2.471 and 1.7.3.475 Beta

Share this post


Link to post
Share on other sites
3 hours ago, Lagarto said:

I am currently using Affinity apps only on a laptop where I do not have a font manager installed, and have about 700 fonts installed, and can experience the same in smaller scale, but had not actually noticed the rebuild of font previews (or even a bit longish launch times), probably because there has not been any urge in using the apps in actual work projects.

I use the Affinity apps on a laptop where I do have a font manager, but I also have about 700 fonts installed. There is some delay on startup, but smaller than it used to be before version 1.7 and not unacceptable.

I am not surprised that the OP’s ‘cull’ of fewer than 200 fonts from a collection of nearly 5000 installed fonts made no appreciable difference.


Alfred online2long.gif
Affinity Designer/Photo/Publisher 1.7.2.471 • Windows 10 Home (4th gen Core i3 CPU)
Affinity Photo for iPad 1.7.2.153 • Designer for iPad 1.7.2.6 • iOS 12.4.1 (iPad Air 2)

Share this post


Link to post
Share on other sites

Having a more thorough look on this.

For me the the short delay at program launch is totally acceptable, and I have never felt it would be anything exceptional, but I now ran tests with launch times using InDesign, Quark and Affinity Publisher ("First time" means running after a fresh boot + 5 minutes, seeing that the processor is more or less idle; "Second time" means closing the app and immediately after reopening it, no concurrently running other tasks other than antivirus and other typical background processing):

InDesign (CS6):

First time:  Program ready at 0:20, default document created, text frame added and font Zapf Chancery picked from font list and ABC added at 0:41, second time program ready at 0:07, saved doc opened, ABC selected by double click, font changed to Yu Gothic Bold at 0:25.

QuarkXPress 2018:

First time: Program ready at 0:35, default document created, text frame added and font Zapf Chancery picked form font list and ABC added at 1:16; second time program ready at 0:32, saved doc opened, ABC selected by double click, font changed to Yu Gothic Bold at 1:03.

Affinity Publisher (beta 1.73.475):

First time:  Program ready at 0:20, default document created, text frame added and font Zapf Chancery picked from font list and ABC added at 0:58, second time program ready at 0:18, saved doc opened, ABC selected by double click, font changed to Yu Gothic Bold at 0:39.

===

InDesign clearly shines, but Affinity does very well, especially considering that it creates previews for all substyles for the font list from which the font is picked and the other two apps just create a list of family names and a preview for the default font for the family (the substyle being picked from a secondary list showing previews for just one family). 

As the delay seems to be related specifically to building the previews of the installed fonts (rather than just enumerating them), an app specific font cache itself probably would not have much effect on the matter. One solution would be just continue building the previews at idle time and provide an alternative font list without previews, which could be accessed e.g. from the Character panel.  This way the complete font list without previews would be immediately available at program launch and the lists with previews would typically be completely finished within a minute or two. But as the test shows, the list can be used and builidng interrupted practically as soon as the program has launched.

But considering that this test was done with about 700 fonts installed, which is probably quite average, I am not sure if this is really a problem. Perhaps there is a trigger with the number of fonts installed where things get remarkably worse, but I'd definitely suggest use of a font manager if projects are so varied that they require a constant and immediate access to a very large collection of fonts. The test was performed on a laptop with 16GB RAM, SSD, Intel Core i7-7700HQ CPU @ 2.80GHz), Intel HD Graphics 630 + NVIDIA GeForce GTX 1050, running latest version of 64-bit Windows 10 Pro (1903).

UPDATE: There seems to be some variation in Affinity Publisher depending on which font, and how, it is selected. E.g., when scrolling down somewhere in the middle of the font list and then hesitating for a while, or trying to open the substyles dropdown, there might be unresponsiveness that can last 30 seconds or so, so the building process does not yield time for interactive processes well all of the time. So there might be point for creating a non-preview font list in the context of Character panel which would be lightweight and fast scrollable. On the other hand, I also found that typing in a few first characters of the font name (e.g. Helv) and then selecting directly the family name without trying to open the sub styles group, but instead selecting the substyle from the secondary menu, allows quick selection of font even when rebuild of font previews is clearly taking procesing time. Undecisive scrolling with the mouse may indeed be a painful experience, and if it seems to take time, it is better to just drop the task and try again with the suggested type-in initial letters + pick font family method.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×