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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

potential listener LEAK detected, having 185 listeners already. #211105

Open
jrieken opened this issue Apr 23, 2024 · 3 comments
Open

potential listener LEAK detected, having 185 listeners already. #211105

jrieken opened this issue Apr 23, 2024 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug notebook-toc-outline
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented Apr 23, 2024

Testing #210961

  • todays insiders 347777655976bbc8460f833449592dd0a9a8f340
  • having a really large ipynb notebook
  • 馃悰 seeing the leak warning below
event.ts:875 [72h] potential listener LEAK detected, having 185 listeners already. MOST frequent listener (8):
check @ event.ts:875
q @ event.ts:1056
M @ menuService.ts:395
q @ event.ts:1064
m @ notebookOutline.ts:217
renderElement @ notebookOutline.ts:182
renderElement @ abstractTree.ts:418
renderElement @ listWidget.ts:1249
Z @ listView.ts:940
(anonymous) @ listView.ts:876
transact @ rowCache.ts:80
Y @ listView.ts:867
ib @ listView.ts:1107
y @ event.ts:1156
z @ event.ts:1167
fire @ event.ts:1191
(anonymous) @ scrollableElement.ts:216
y @ event.ts:1156
fire @ event.ts:1187
n @ scrollable.ts:393
setScrollPositionNow @ scrollable.ts:303
R @ scrollableElement.ts:470
$ @ scrollableElement.ts:382
event.ts:876 Error
    at c.create (event.ts:889:25)
    at l.q [as onDidChange] (event.ts:1055:34)
    at Object.M [as onWillAddFirstListener] (menuService.ts:395:34)
    at f.q [as onDidChange] (event.ts:1064:20)
    at O.m (notebookOutline.ts:217:44)
    at O.renderElement (notebookOutline.ts:182:9)
    at A.renderElement (abstractTree.ts:418:17)
    at Y.renderElement (listWidget.ts:1249:13)
    at m.Z (listView.ts:940:13)
    at listView.ts:876:11
    at E.transact (rowCache.ts:80:4)
    at m.Y (listView.ts:867:14)
    at m.ib (listView.ts:1107:9)
    at n.y (event.ts:1156:13)
    at n.z (event.ts:1167:9)
    at n.fire (event.ts:1191:9)
    at d.value (scrollableElement.ts:216:19)
    at n.y (event.ts:1156:13)
    at n.fire (event.ts:1187:9)
    at I.n (scrollable.ts:393:18)
    at I.setScrollPositionNow (scrollable.ts:303:8)
    at n.setScrollPosition (scrollableElement.ts:619:21)
    at m.setScrollTop (listView.ts:1030:26)
    at X.reveal (listWidget.ts:1909:14)
    at ie.reveal (abstractTree.ts:2989:14)
    at d.H [as value] (outlinePane.ts:332:11)
    at n.y (event.ts:1156:13)
    at n.z (event.ts:1167:9)
    at n.fire (event.ts:1191:9)
    at d.value (notebookOutline.ts:375:24)
    at n.y (event.ts:1156:13)
    at n.z (event.ts:1167:9)
    at n.fire (event.ts:1191:9)
    at u.r (notebookOutlineProvider.ts:298:22)
    at notebookOutlineProvider.ts:57:79
    at async.ts:364:13
check @ event.ts:876
q @ event.ts:1056
M @ menuService.ts:395
q @ event.ts:1064
m @ notebookOutline.ts:217
renderElement @ notebookOutline.ts:182
renderElement @ abstractTree.ts:418
renderElement @ listWidget.ts:1249
Z @ listView.ts:940
(anonymous) @ listView.ts:876
transact @ rowCache.ts:80
Y @ listView.ts:867
ib @ listView.ts:1107
y @ event.ts:1156
z @ event.ts:1167
fire @ event.ts:1191
(anonymous) @ scrollableElement.ts:216
y @ event.ts:1156
fire @ event.ts:1187
n @ scrollable.ts:393
setScrollPositionNow @ scrollable.ts:303
R @ scrollableElement.ts:470
$ @ scrollableElement.ts:382
@jrieken
Copy link
Member Author

jrieken commented Apr 23, 2024

Looks like this is coming from here:

templateData.elementDisposables.add(menu.onDidChange(() => {

Setting up a listener per rendered element isn't great, it's better to have one and share it with the elements

@jrieken
Copy link
Member Author

jrieken commented Apr 23, 2024

This is the notebook I am testing with: slow.ipynb.txt

@jrieken
Copy link
Member Author

jrieken commented Apr 23, 2024

same/related #211112

@DonJayamanne DonJayamanne removed their assignment Apr 23, 2024
@Yoyokrazy Yoyokrazy added bug Issue identified by VS Code Team member as probable bug notebook-toc-outline labels Apr 29, 2024
@Yoyokrazy Yoyokrazy added this to the May 2024 milestone Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug notebook-toc-outline
Projects
None yet
Development

No branches or pull requests

3 participants