FXMisc / RichTextFX

Rich-text area for JavaFX
BSD 2-Clause "Simplified" License
1.21k stars 236 forks source link

StyleClassedTextArea consumes too much memory #119

Closed hrzafer closed 9 years ago

hrzafer commented 9 years ago

I read a 3 MB text file put its content to my StyleClassedTextArea object with the following code:

byte[] bytes = Files.readAllBytes(file.toPath()); String str = new String(bytes, "UTF-8"); area.setStyleClass(0, area.getLength(), UNKNOWN); area.replaceText(0, area.getLength(), str);

My program stucks and on the tast manager memory usage starts to increase from 180 MB to something around 4GB.

Am I doing something wrong?

TomasMikula commented 9 years ago

I am unable to reproduce this problem. What version of RichTextFX are you using? There was a performance issue fixed in version 0.6.2 that could have fixed this.

TomasMikula commented 9 years ago

If you experience this problem in 0.6.2, please re-open this issue and include a minimal reproducible example.

hrzafer commented 9 years ago

I was using version 0.6. Now I updated my pom.xml and it works OK.