Fastest way to create a Java message dialog (swing/awt/other)?

后端 未结 10 840
醉梦人生
醉梦人生 2021-01-17 12:41

I\'m creating a Java application that will do some processing then needs to display a message to give the user feedback.

However, it appears to be incredibly slow -

10条回答
  •  清酒与你
    2021-01-17 13:22

    Since you're interested in speeding this up, and since most of the overhead seems to be JVM startup overhead, check out Nailgun which aims to address slow JVM startup by keeping a JVM running in the background all the time. In your case, after one run the Swing library too will end up being cached (and hopefully after a few more runs JITed too), further reducing the overhead.

    However this approach will lead to increased memory usage due to the background JVM and also cause other problems since it may not be straightforward to determine when to shut it down.

提交回复
热议问题