firefox-devtools / firefox-devtools/profiler

Idle java threads fill entire timeline

Open
#4,004 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.5k
Forks
491
Avg merge
3d 5h
Merged PRs (30d)
30

Description

_See also https://bugzilla.mozilla.org/show_bug.cgi?id=1766532 for required platform changes._

Idle java threads (except for the main thread) are unexpectedly filling the timeline while idle:

![image](https://user-images.githubusercontent.com/759372/165392828-f6116513-d9d3-4e9e-b762-bffb4ebdc114.png)

See this profile: https://share.firefox.dev/3vOqsBy

We should do what we do for the java main thread where the idling call doesn't appear on the timeline. The two methods that seem to trigger this are:

* `java.lang.Object.wait`
* `org.mozilla.gecko.mozglue.GeckoLoader.nativeRun`

One issue is that there may be legitimate uses of `Object.wait` that we want to see in the timeline but using it is discouraged over higher-level concurrency APIs so it's probably okay.

┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-542)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.