Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NETBEANS-3666] improve performance of multitabs on startup if many files are open #1848

Merged
merged 2 commits into from Jan 5, 2020

Conversation

DevCharly
Copy link
Member

This is an attempt to fix/workaround the startup performance problem if many files are open and multitabs are used (which is not the default).

There are actually two problems:

  1. getPreferredWidth() is invoked very often from the multitabs table listener (~60000 times for 200 open files)
  2. the text (usually a filename) is always HTML (but does not contain other HTML tags), which involves slow HTML parsing

This PR addresses only 2.

// The HTML rendering makes startup slow (and CPU load high).
// To workaround this, remove the leading "<html>" if text does not
// contain HTML tags or entities.
String prefix = "<html>";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

//NOI18N at the end of the line please.

@lkishalmi
Copy link
Contributor

Seems to be pretty harmless.

@lkishalmi lkishalmi merged commit 75284d5 into apache:master Jan 5, 2020
@lkishalmi
Copy link
Contributor

Next time you can really do an amended forced push for such small changes, so I can just rebase and merge it.

@DevCharly DevCharly deleted the multitab-startup-performance branch January 5, 2020 21:25
@eirikbakke
Copy link
Contributor

Nice!

@junichi11 junichi11 added this to the 11.3 milestone Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants