Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Identify the Bug or Feature request
Resolves #5795
Description of the Change
This tackles the key points mentioned in #5795:
JTextArea#append(String)
instead ofJTextComponent#setText(String)
, which lets us avoid string concatenations and lets the text area avoiding reallocating lots of undo and cursor tracking information.ZoneRenderer
in particular uses microseconds for reporting, and sets its threshold much lower at 1 microsecond.There are also a few other improvements done along the way:
GdxRenderer
has updatedCodeTimer
usage, i.e., works withCodeTimer.using(...)
rather than managing its ownCodeTimer
instance.RenderHelper
, which now supports a configurable prefix for its timers.CodeTimer
encounters unbalancedstart()
andend()
calls, it now logs them as a warning rather than throwing an exception. A user should not be bothered by a dialog for such non-critical logic errors.CodeTimer
tries to stay out of the way as much as possible. Instead of doing map lookups and string formatting instart()
,stop()
, andincrement()
calls, these instead append some information to a running list. When done with theCodeTimer
, the results are compiled and reported out of band, so as not to hold up the rendering.Possible Drawbacks
CodeTimer
will have different performance characteristics, so we'll have to keep on eye on things to make sure it isn't worse in some situations.Documentation Notes
N/A
Release Notes
This change is