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

Listener leak alarm for onThemeChange #69896

Closed
jrieken opened this issue Mar 6, 2019 · 3 comments
Closed

Listener leak alarm for onThemeChange #69896

jrieken opened this issue Mar 6, 2019 · 3 comments
Assignees
Labels
debt Code quality issues feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented Mar 6, 2019

Pretty sure this isn't a leak and iff so then we should increase the listener limit for that specific event.

[8ag] potential listener LEAK detected, having 202 listeners already. MOST frequent listener (35):
check @ /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:72
/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:72     at o (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1701:259)
    at Object.t.attachBadgeStyler (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1701:544)
    at new E (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2186:288)
    at t.create (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:217:102)
    at s._createInstance (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1381:680)
    at s.createInstance (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1381:92)
    at e.renderTemplate (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:2186:897)
    at _.renderTemplate (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:931:887)
    at x.renderTemplate (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:907:551)
    at renderers.map.t (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:798:609)
    at Array.map (<anonymous>)
    at H.renderTemplate (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:798:600)
    at n.alloc (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:158:813)
    at y.insertItemInDOM (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:398:114)
    at y._splice (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:394:515)
    at y.splice (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:393:142)
    at spliceables.forEach.n (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:7:658)
    at Array.forEach (<anonymous>)
    at i.splice (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:7:645)
    at i.length.eventBufferer.bufferEvents (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:804:75)
    at g.bufferEvents (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:75:214)
    at A.splice (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:804:42)
    at A.splice (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:918:235)
    at l.splice (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:80:759)
    at s._setChildren (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:87:198)
    at setChildren (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:87:92)
    at setChildren (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:930:19)
    at q.render (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:942:607)
    at q.<anonymous> (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:939:536)
    at Generator.next (<anonymous>)
    at r (file:///Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:30:772)
    at process._tickCallback (internal/process/next_tick.js:68:7)
check @ /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:72
@bpasero
Copy link
Member

bpasero commented Mar 6, 2019

Yeah I am seeing this very often and I checked each time for leaks, but could not find anything obvious.

@bpasero bpasero added the debt Code quality issues label Mar 6, 2019
@bpasero bpasero removed their assignment Mar 7, 2019
@bpasero
Copy link
Member

bpasero commented Mar 7, 2019

@aeschli this would have to be changed in

this.onColorThemeChange = new Emitter<IColorTheme>();

by passing in options to configure the threshold.

@aeschli
Copy link
Contributor

aeschli commented Mar 7, 2019

There's a lot of listeners for color changes, but I could also not find any leaks when testing.
I didn't get the number of listeners above 200, but it's feasible if you install additional viewlets.
Increased to 400.

@aeschli aeschli added this to the March 2019 milestone Mar 7, 2019
@aeschli aeschli closed this as completed in 5a552a4 Mar 7, 2019
@aeschli aeschli added the feature-request Request for new features or functionality label Mar 26, 2019
@weinand weinand added the verification-needed Verification of issue is requested label Mar 26, 2019
@roblourens roblourens added the verified Verification succeeded label Mar 27, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants