Bug 552789 - [GTK] org.eclipse.swt.widgets.Display.gtk_css_parse_foreground sticks out in Yourkit
Summary: [GTK] org.eclipse.swt.widgets.Display.gtk_css_parse_foreground sticks out in ...
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.14   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2019-11-07 05:54 EST by Lars Vogel CLA
Modified: 2020-02-17 03:56 EST (History)
3 users (show)

See Also:


Attachments
Screenshot (53.38 KB, image/png)
2019-11-07 05:54 EST, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2019-11-07 05:54:30 EST
Created attachment 280548 [details]
Screenshot

org.eclipse.swt.widgets.Display.gtk_css_parse_foreground sticks out in Yourkit which tracing a running IDE. It seems to be calling very frequently regex.Match.find. 

Maybe introduce a cache for caching these calls?
Comment 1 Eric Williams CLA 2019-11-07 14:54:31 EST
Interesting, it could probably be cached yes. It might have to be done at the per-Widget level (instead of Display). This would be a good candidate for 4.15 IMO.
Comment 2 Lars Vogel CLA 2019-12-12 09:26:51 EST
(In reply to Eric Williams from comment #1)
> Interesting, it could probably be cached yes. It might have to be done at
> the per-Widget level (instead of Display). This would be a good candidate
> for 4.15 IMO.

Can you look at this for 4.15M1?
Comment 3 Eric Williams CLA 2019-12-13 08:36:20 EST
(In reply to Lars Vogel from comment #2)
> (In reply to Eric Williams from comment #1)
> > Interesting, it could probably be cached yes. It might have to be done at
> > the per-Widget level (instead of Display). This would be a good candidate
> > for 4.15 IMO.
> 
> Can you look at this for 4.15M1?

Unfortunately I won't be able to for M1 as I have some other things on my plate. I'd be happy to review patches though.
Comment 4 Alexander Kurtakov CLA 2020-01-06 15:42:02 EST
Retarget.
Comment 5 Alexander Kurtakov CLA 2020-01-10 10:43:53 EST
I wasn't able to see such hotspot (not enough Yourkit-fu probably). Lars, please check whether it still happens for you.
Comment 6 Alexander Kurtakov CLA 2020-02-17 03:47:44 EST
Remove target. I also think of closing as worksforme (will do on next triage) as I can't reproduce it.