Skip to content

Commit 1c8b056

Browse files
committed
more notes about font issues and performance
1 parent 5d727e8 commit 1c8b056

2 files changed

Lines changed: 17 additions & 9 deletions

File tree

core/src/processing/core/PFont.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -894,15 +894,19 @@ static public String[] list() {
894894

895895

896896
/**
897-
* Make an internal list of all installed fonts. This can take a while with
898-
* a lot of fonts installed, but running it on a separate thread may not
899-
* help much. As of the commit that's adding this note, loadFonts() will
900-
* only be called by PFont.list() and when loading a font by name, both of
901-
* which are occasions when we'd need to block until this was finished
902-
* anyway. It's also possible that running getAllFonts() on a non-EDT thread
903-
* could cause graphics system issues. Further, the first fonts are usually
904-
* loaded at the beginning of a sketch, meaning that sketch startup time
905-
* will still be affected, even with threading (and blocking) in place.
897+
* Make an internal list of all installed fonts.
898+
*
899+
* This can take a while with a lot of fonts installed, but running it on
900+
* a separate thread may not help much. As of the commit that's adding this
901+
* note, loadFonts() will only be called by PFont.list() and when loading a
902+
* font by name, both of which are occasions when we'd need to block until
903+
* this was finished anyway. It's also possible that running getAllFonts()
904+
* on a non-EDT thread could cause graphics system issues. Further, the first
905+
* fonts are usually loaded at the beginning of a sketch, meaning that sketch
906+
* startup time will still be affected, even with threading in place.
907+
*
908+
* Where we're getting killed on font performance is due to this bug:
909+
* https://bugs.openjdk.java.net/browse/JDK-8179209
906910
*/
907911
static public void loadFonts() {
908912
if (fonts == null) {

todo.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ X update to Java 8u202
99
X "Sketch disappeared" infinite pop up dialogs
1010
X https://github.com/processing/processing/pull/4808
1111
X https://github.com/processing/processing/issues/4805
12+
X text("test", 10, 10); is still slow with lots of fonts
13+
X https://bugs.openjdk.java.net/browse/JDK-8179209
14+
X added a note to the Known Issues section in the Changes wiki
15+
_ update the about screen to 2019
1216

1317
fixed earlier
1418
X Could not initialize class com.sun.jna.Native on startup (Windows)

0 commit comments

Comments
 (0)