Menu

If you're having performance issues when scrolling/selecting nodes

2019-11-20
2020-03-24
  • Nathan Subra

    Nathan Subra - 2019-11-20

    Tested Versions: Freeplane v1.7.10 / Windows 10 (1909) / Oracle Java 1.8.0_231-b11.

    I was having 1/2s of lag when scrolling, typing, or selecting nodes, scrolling was also stuttering and would jump/skip. Changing the xmx memory settings and fiddling with Windows Compatibility/DPI settings didn't help. I came across this article on Stackoverflow (https://stackoverflow.com/questions/46006654/swing-using-lots-of-cpu-when-calling-repaint-in-a-minimized-rdp-sessionwhich) reccomended forcing Java to use OpenGL rendering instead of Direct3D by adding the following flag into your Freeplane ini file:

    -Dsun.java2d.d3d=false

    After adding this flag and restarting freeplane, my performance is great now. There is almost zero lag in Freeplane. I just wanted to share this in case anyone else is having similar issues.

    I've also found a reference to:

    -Dsun.java2d.opengl=True

    Which I've added to my ini as well, but there doesn't seem to be any difference from .d3d=false, I'm not sure what the difference is between the two flags, but I wanted to list it here as well in case others run into this.

    edit: Flags described here:
    https://docs.oracle.com/javase/8/docs/technotes/guides/2d/flags.html#all
    They both appear to do the same thing, d3d is windows specific, while opengl should work for all platforms.

    Also wanted to say thanks to the Freeplane devs for all that you do-- I appreciate how much work goes into this

    -One happy Freeplane user

     

    Last edit: Nathan Subra 2019-11-20
  • sfpcom

    sfpcom - 2019-11-22

    Hi Nathan, where is the file freeplane.ini?
    Thanks
    SFPC

     
  • njk

    njk - 2020-01-23

    Also terrible performance when scrolling the map. It would seem it is antialiasing causing this problem and workaround is to disable it.

    Solution:
    1. Open Freeplane (mine is 1.7.11)
    2. Open Preferences (Menu "Tools" - "Preferences")
    3. Open the "Appearance" tab
    4. Disable all antialias options
    5. Click the OK button
    6. Observe

    Drawbacks:
    1. The map is terrible on the eyes and gives a sad impression in meetings.

    Alternatives:
    1. On Windows: Use FreeMind (Works like a charm)
    2. On Linux: Use FreeMind (AppArmor and Snap Store issues regarding permissions)

    System specs:
    Ubuntu 19.10 64bit
    KDE: Plasma 5.16.5 | Framework 5.62.0 | Qt 5.12.4
    Processors: 4xIntel Core i3 CPU M 350 @ 2.27GHz
    RAM: 8GB
    Freeplane 1.7.11
    Java: Openjdk 1.8.0_232

     
    • Felix Natter

      Felix Natter - 2020-01-23

      hello njk,

      did you try the d3d flag has Nathan suggested?
      Also, there are a few ideas here (like changing the L&F):
      https://www.freeplane.org/wiki/index.php/Rendering_Issues#Things_to_try
      https://wiki.archlinux.org/index.php/Java#Tips_and_tricks

      Cheers and Best Regards,
      Felix

       
      • njk

        njk - 2020-01-23

        Hi @fnatter / Felix

        1. I could not find the "freeplane.ini" file Nathan suggested. That solution seems to be Windows specific.

        2. Regarding https://www.freeplane.org/wiki/index.php/Rendering_Issues .
          I did follow the tips and got to 3rd option where it is to disable antialiasing. The major performance gain is when using "Clouds" in the map. I'm not an expert in the code, but it could be the way the libraries are used, the limitation of the libraries (I'm sceptical when comparing the code to FreeMind's), or just how the code was modified in FP. Could be related to this source file "CloudView.java" maybe? Anyway, I guess there may be some refactoring and optimization requirements.

        3. In the "freeplane.sh" file, by using
          OpenGL "JAVA_OPTS="-Dsun.java2d.opengl=true $JAVA_OPTS"
          instead of
          Xrender "JAVA_OPTS="-Dsun.java2d.xrender=true $JAVA_OPTS"
          there might be some performance increase, but I would not notice a 2 to 5 fps increase.

        4. Regarding https://wiki.archlinux.org/index.php/Java#Tips_and_tricks.
          It is not recommended to disable the AA of fonts in "freeplane.sh"
          [JAVA_OPTS="-Dawt.useSystemAAFontSettings=off -Dswing.aatext=false $JAVA_OPTS"].
          Things become almost unreadable and the performance gain is minimal.

        Regards,

         
  • Dimitry Polivaev

    Hi njk,

    I am following the conversation. It would be helpful if you could open a bug report and submit some map where Freemind scrolls faster than Freeplane. I can only investigave issues which I can reproduce on my machine, I think you see it.

    Regardind the option -Dsun.java2d.d3d=false, in linux you can add it to JAVA_OPTS in freeplane.sh, it is just an option as any other. Ini files are used by windows exe launchers.

    Regards

     
    • njk

      njk - 2020-01-23

      Cool.

      Give me some time to scrape the personal information in the mindmap.
      Apart from the screenrecording, what other information would be helpful?

      On Ubunti I use Freeplane because AppArmor is causing issues with FreeMind.
      I use FreeMind in a Windows 7 Pro 64bit Oracle VBox with lower specs as well since I need the networking Share Map/Join Map functionality.
      Since it's different technology configurations, will the information still be useful too you?
      What I can do is install FreePlane on the VBox instance as well so we can compare apples with apples. Until Snap-store and AppArmor sort their issues out one day. What do you think?

      Regards,

       
    • njk

      njk - 2020-01-24

      @Dimitry

      Great news (statup update)! Thanks for discussion and looking at the post.

      Summary:
      The low performance experience of Freeplane and Freemind are ONLY on my Linux configuration. When running both applications on my VBox Windows 7 Pro 64bit, side-by-side, the experience is MUCH better in both applications.

      Constructive Critisism :)
      With Freeplane the user can edit the "Dsun.java2d." system properties flags with much more ease. https://docs.oracle.com/javase/7/docs/technotes/guides/2d/flags.html

      Non Freeplane
      Regarding Freemind 1.0.1 on Linux. It's installed using "snap" which seems like it's running in WINE. Getting Freemind started from ZIP hangs during startup "load maps" and not returning results to why it hangs there. Anyhew, this is NOT the forum for this.

      Next steps for me
      1. Read up on the Freeplane feature requests regarding the Sharing of maps over a network. Example: https://sourceforge.net/p/freeplane/featurerequests/2468/
      2. Figure out how to get Freeplane running DEBUG out of Eclipse to get better information for troubleshooting and bug reporting. https://www.freeplane.org/wiki/index.php/IDE_setup
      3. Figure out how to do plugin development for Freeplane. https://www.freeplane.org/wiki/index.php/Plugin_development
      4. Figure out how to do add-on development for Freeplance. https://www.freeplane.org/wiki/index.php/Add-ons(install)
      5. Figure out how to do scripting for Freeplance. https://www.freeplane.org/wiki/index.php/Scripting

       
      • Dimitry Polivaev

        I do not plan to work on collaborative mind map editing to Freeplane.
        However if someone wants to implement it I can offer nearly unlimited support by chats, hangouts, reviews and discussions so that the person is not left on their own.

        Improving performance of Freeplane on your system would be great and likely for the benefit of some other users too. However for this we need to try it on your system with different java options and maybe different rendering flags. The problem probably arises from the was how Java interacts with graphic drivers. Therefore please try flags discussed at the beginning of this thread and report the results.

         
  • Dimitry Polivaev

    The most important would be the mind map itself.
    To obfuscate it you can open Edit->Find->Find and Replace...
    check the upper "regular expressions" box
    put \w into the "Find" field and x into the "Replace" field and click on "Replace all"
    Save the map as another file

    Screen recording could be useful to see what exactly you do with the map

     
  • Brandon Johns

    Brandon Johns - 2020-03-24

    To add to this thread, a solution for the same scrolling lag in Docear (reference manager), which uses Freeplane as it's base.

    Symptoms of issue:
    ~1/2 second lag when scrolling in map or moving map with mouse
    GPU usage spikes to 100% during lag spike

    Solution Works Tested to Work On:
    Docear Version 1.2.0 stable build291
    (based on) Freeplane 1.3.2 alpha
    Running on Windows 10 Version 1909
    Java Version 1.8.0_241

    Solution:
    Edit the file props.xargswith a text editor e.g. Notepad. This file is located in the root of Docear's program files.

    Add the following line at the end of this file:
    -Dsun.java2d.d3d=false

    Thanks to everyone in this thread for helping me to solve this issue <3