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

Fix save as without changing the file name #14212

Merged
merged 3 commits into from Mar 17, 2023

Conversation

hbcarlos
Copy link
Member

Follow-up #14182

I just realized there is an issue. When saving the document with the same name, the Drive emits a save event with the same name, so we close the document but do not open the new one.

This fix will prevent closing the document if we are not opening a new one.

Grabacion.de.pantalla.2023-03-16.a.las.14.24.18.mov

cc @fcollonval

References

Code changes

User-facing changes

Backwards-incompatible changes

@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks @hbcarlos

If we do that, could we remove the logical change introduced in https://github.com/jupyterlab/jupyterlab/pull/14182/files#diff-bd91309321cead1ad13aa66f461c81110113c117fababf12ea04e346b0b5afb5

aka switching back to

if (this.isDisposed || !newPath) {
  return;
}

instead of rejecting the promise.

And could you add a jest test that if the path is the same, no save event should be triggered.

I can help if you are not available.

@fcollonval fcollonval changed the title Follow up #14182 Fix save as without changing the file name Mar 16, 2023
@fcollonval fcollonval added this to the 3.6.x milestone Mar 16, 2023
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks @hbcarlos

@fcollonval fcollonval merged commit b80523f into jupyterlab:master Mar 17, 2023
@fcollonval
Copy link
Member

@meeseeksdev please backport to 3.6.x

@lumberbot-app
Copy link

lumberbot-app bot commented Mar 17, 2023

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 3.6.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 b80523f742d9afe9846b9cf79a8e65e87cc0b7c1
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #14212: Fix save as without changing the file name'
  1. Push to a named branch:
git push YOURFORK 3.6.x:auto-backport-of-pr-14212-on-3.6.x
  1. Create a PR against branch 3.6.x, I would have named this PR:

"Backport PR #14212 on branch 3.6.x (Fix save as without changing the file name)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@github-actions
Copy link
Contributor

Benchmark report

The execution time (in milliseconds) are grouped by test file, test type and browser.
For each case, the following values are computed: min <- [1st quartile - median - 3rd quartile] -> max.

The mean relative comparison is computed with 95% confidence.

Results table
Test file large_code_notebook large_md_notebook
open
chromium
actual 481 <- [526 - 545 - 568] -> 658 1007 <- [1065 - 1092 - 1111] -> 1275
expected 482 <- [559 - 585 - 656] -> 879 632 <- [1077 - 1099 - 1165] -> 1450
Mean relative change -8.7% ± 2.4% -2.4% ± 1.8%
switch-from
chromium
actual 530 <- [594 - 621 - 646] -> 719 216 <- [277 - 294 - 320] -> 373
expected 559 <- [652 - 693 - 759] -> 991 234 <- [285 - 303 - 330] -> 528
Mean relative change -13.2% ± 2.4% -5.1% ± 3.5%
switch-to
chromium
actual 991 <- [1023 - 1044 - 1064] -> 1204 610 <- [678 - 696 - 713] -> 823
expected 1036 <- [1100 - 1140 - 1209] -> 1510 645 <- [691 - 710 - 747] -> 937
Mean relative change -10.6% ± 1.7% -4.4% ± 1.8%
close
chromium
actual 128 <- [140 - 146 - 152] -> 165 167 <- [193 - 204 - 217] -> 235
expected 130 <- [146 - 152 - 174] -> 253 171 <- [194 - 209 - 225] -> 333
Mean relative change -8.3% ± 2.6% -4.7% ± 2.8%

Changes are computed with expected as reference.

@jupyterlab/benchmarks@1.0.0 test:mocha
mocha ./tests/

Waiting for localhost:8888
localhost:8888 is up

Cell memory leaks

Create a code cell Memory change: +152 kB Leak detected: Yes

Leaking objects:

Object # added Retained size increase
ArraySearchMarker 1 +5 B
ContentDeleted 1 +16 B
ContentString 1 +69 B
Detached Text 1 +69 B
FocusTracker 1 +276 B
ObservableList 1 +60 B
OutputArea 1 +1.4 kB
OutputAreaModel 1 +115 B
Promise 1 +24 B
PromiseDelegate 1 +128 B
ResizeHandle 1 +47 B
RestorablePool 1 +304 B
UndoManager 1 +1.93 kB
WidgetTracker 1 +980 B
YArray 1 +164 B
YCodeCell 1 +107 B
YText 1 +281 B
Detached DOMStringMap 2 +88 B
Detached V8EventHandlerNonNull 2 +80 B
Set 2 +1.21 kB
YMap 2 +464 B
StackItem 3 +1.32 kB
ContentAny 4 +241 B
ContentType 4 +64 B
DeleteItem 4 +80 B
DeleteSet 6 +988 B
Detached HTMLCollection 6 +560 B
EventHandler 8 +267 B
ID 10 +320 B
Item 10 +1.21 kB
Detached DOMTokenList 13 +800 B
Detached Attr 14 +1.01 kB
Detached HTMLDivElement 14 +46.6 kB
Map 17 +2.65 kB
Signal 19 +319 B
Object 35 +27.4 kB
Array 44 +5.7 kB
Detached V8EventListener 263 +23.4 kB
Detached EventListener 265 +42.6 kB
(closure) 270 +25.1 kB
Detached InternalNode 323 +45.1 kB

Leaking collections:

Type Change Preview Size increased at
Array +2 [StackItem, ...]
UndoManager.afterTransactionHandler  http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:5030:15
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.forEach <anonymous>
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.<anonymous> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4693:27
webpack://jupyterlab/node_modules/lib0/function.js:19:0
cleanupTransactions http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4695:62
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4810:9
Doc.transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:2023:5
Array +10 [Item, ...]
addStruct                    http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4268:11
Item.integrate http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:11054:7
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6617:22
Array.forEach <anonymous>
typeListInsertGenericsAfter http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6590:11
typeListInsertGenerics http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6677:10
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6996:9
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4796:5
YArray.insert http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6995:7
Set +1 Set((anonymous function), ...)
                          webpack://jupyterlab/node_modules/lib0/observable.js:30:56                                                                                     
Doc.on http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:2182:11
new UndoManager http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:5050:14
YCodeCell.setUndoManager http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:398:33
<unknown> http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1584:15
Array.forEach <anonymous>
YNotebook.insertCells http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1583:16
YNotebook.insertCell http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1564:21
webpack://jupyterlab/packages/notebook/src/actions.tsx:404:22
Create a markdown cell Memory change: -89.1 kB Leak detected: No

Leaking objects:

Object # added Retained size increase
ActivityMonitor 1 +294 B
ArraySearchMarker 1 +5 B
AttachmentsModel 1 +193 B
AttachmentsResolver 1 +14 B
CodeCellModel 1 +217 B
ContentString 1 +69 B
Debouncer 1 +3.46 kB
Detached HTMLAnchorElement 1 +312 B
Detached HTMLButtonElement 1 +5.31 kB
Detached HTMLHeadingElement 1 +1.01 kB
Error 1 +3.06 kB
MarkdownCell 1 +4.73 kB
MarkdownCellModel 1 +237 B
Poll 1 +3.7 kB
RenderMimeRegistry 1 +227 B
RenderedMarkdown 1 +66 B
Transaction 1 +860 B
TypeError 1 +312 B
YArray 1 +164 B
YArrayEvent 1 +357 B
YCodeCell 1 +107 B
YMarkdownCell 1 +45 B
Detached CSSStyleDeclaration 2 +140 B
Detached HTMLElement 2 +320 B
Detached V8EventHandlerNonNull 2 +5.04 kB
Promise 2 +3.06 kB
PromiseDelegate 2 +3.27 kB
UndoManager 2 +2.38 kB
YText 2 +462 B
Detached DOMStringMap 3 +152 B
ObservableMap 3 +381 B
StackItem 3 +1.33 kB
DeleteItem 4 +80 B
YMap 4 +872 B
ContentAny 5 +524 B
DeleteSet 6 +1 kB
ContentType 7 +112 B
Detached Text 7 +504 B
Set 8 +1.78 kB
Detached HTMLDivElement 10 +30.7 kB
Detached DOMTokenList 13 +900 B
ID 13 +416 B
Item 13 +1.78 kB
EventHandler 14 +431 B
Detached HTMLCollection 17 +1.84 kB
Map 27 +12.1 kB
Signal 28 +628 B
Detached V8EventListener 130 +10.9 kB
Detached EventListener 132 +25.5 kB
(closure) 152 +27.9 kB
Detached InternalNode 162 +28.5 kB

Leaking collections:

Type Change Preview Size increased at
Array +1 [{signal, slot, thisArg}, ...]
Object.connect  http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10490:17
Signal.connect http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10230:24
webpack://jupyterlab/packages/cell-toolbar/src/celltoolbartracker.ts:121:37
invokeSlot http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10699:18
Object.emit http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10657:17
Signal.emit http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10256:17
webpack://jupyterlab/packages/notebook/src/widget.ts:1321:30
webpack://jupyterlab/packages/notebook/src/actions.tsx:408:28
webpack://jupyterlab/packages/notebook-extension/src/index.ts:2719:15
Array +1 [d8291a88-dbd7-4972-8669-297d3b58161a, ...]
                                     webpack://jupyterlab/packages/notebook/src/actions.tsx:2503:37            
Array.forEach <anonymous>
webpack://jupyterlab/packages/notebook/src/actions.tsx:2498:21
webpack://jupyterlab/packages/notebook/src/actions.tsx:350:12
webpack://jupyterlab/packages/notebook-extension/src/index.ts:2650:15
CommandRegistry.execute http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:5748:33
CommandRegistry._executeKeyBinding http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:5906:14
CommandRegistry.processKeydownEvent http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:5846:18
JupyterLab.evtKeydown http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:4660:23
Array +1 [{signal, slot, thisArg}, ...]
Object.connect  http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10490:17
Signal.connect http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10230:24
webpack://jupyterlab/packages/notebook/src/notebooktools.ts:226:33
invokeSlot http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10699:18
Object.emit http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10657:17
Signal.emit http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10256:17
webpack://jupyterlab/packages/notebook/src/tracker.ts:90:30
invokeSlot http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10699:18
Object.emit http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10657:17
Array +2 [StackItem, ...]
UndoManager.afterTransactionHandler  http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:5030:15
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.forEach <anonymous>
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.<anonymous> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4693:27
webpack://jupyterlab/node_modules/lib0/function.js:19:0
cleanupTransactions http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4695:62
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4810:9
Doc.transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:2023:5
Array +13 [Item, ...]
addStruct                    http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4268:11
Item.integrate http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:11054:7
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6617:22
Array.forEach <anonymous>
typeListInsertGenericsAfter http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6590:11
typeListInsertGenerics http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6677:10
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6996:9
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4796:5
YArray.insert http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6995:7
Set +2 Set((anonymous function), ...)
                          webpack://jupyterlab/node_modules/lib0/observable.js:30:56                                                                                     
Doc.on http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:2182:11
new UndoManager http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:5050:14
YCodeCell.setUndoManager http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:398:33
<unknown> http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1584:15
Array.forEach <anonymous>
YNotebook.insertCells http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1583:16
YNotebook.insertCell http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1564:21
webpack://jupyterlab/packages/notebook/src/actions.tsx:404:22
Create a raw cell Memory change: +147 kB Leak detected: Yes

Leaking objects:

Object # added Retained size increase
ArraySearchMarker 1 +5 B
CodeCellModel 1 +359 B
ContentString 1 +690 B
Detached CSSStyleDeclaration 1 +68 B
Detached V8EventHandlerNonNull 1 +40 B
ObservableMap 1 +102 B
TypeError 1 +306 B
YArray 1 +164 B
YCodeCell 1 +-61 B
YRawCell 1 +45 B
Detached DOMStringMap 2 +104 B
Set 2 +1.26 kB
UndoManager 2 +2.38 kB
YText 2 +686 B
StackItem 3 +1.33 kB
DeleteItem 4 +80 B
YMap 4 +872 B
ContentAny 5 +524 B
Detached HTMLCollection 5 +484 B
DeleteSet 6 +1 kB
ContentType 7 +112 B
Detached DOMTokenList 9 +608 B
Detached HTMLDivElement 9 +22.6 kB
Signal 11 +450 B
ID 13 +416 B
Item 13 +2.41 kB
EventHandler 14 +442 B
Map 19 +2.98 kB
DOMRectReadOnly 32 +1.79 kB
Detached V8EventListener 130 +10.9 kB
Detached EventListener 131 +20.4 kB
(closure) 140 +27.6 kB
Detached InternalNode 151 +21.7 kB

Leaking collections:

Type Change Preview Size increased at
Array +1 [{signal, slot, thisArg}, ...]
Object.connect  http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10490:17
Signal.connect http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10230:24
webpack://jupyterlab/packages/notebook/src/notebooktools.ts:226:33
invokeSlot http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10699:18
Object.emit http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10657:17
Signal.emit http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10256:17
webpack://jupyterlab/packages/notebook/src/tracker.ts:90:30
invokeSlot http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10699:18
Object.emit http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10657:17
Array +1 [{signal, slot, thisArg}, ...]
Object.connect  http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10490:17
Signal.connect http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10230:24
webpack://jupyterlab/packages/cell-toolbar/src/celltoolbartracker.ts:121:37
invokeSlot http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10699:18
Object.emit http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10657:17
Signal.emit http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:10256:17
webpack://jupyterlab/packages/notebook/src/widget.ts:1321:30
webpack://jupyterlab/packages/notebook/src/actions.tsx:408:28
webpack://jupyterlab/packages/notebook-extension/src/index.ts:2719:15
Array +1 [90f8b2eb-06b7-4cbf-aff4-b339d3d5c022, ...]
                                     webpack://jupyterlab/packages/notebook/src/actions.tsx:2503:37            
Array.forEach <anonymous>
webpack://jupyterlab/packages/notebook/src/actions.tsx:2498:21
webpack://jupyterlab/packages/notebook/src/actions.tsx:350:12
webpack://jupyterlab/packages/notebook-extension/src/index.ts:2650:15
CommandRegistry.execute http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:5748:33
CommandRegistry._executeKeyBinding http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:5906:14
CommandRegistry.processKeydownEvent http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:5846:18
JupyterLab.evtKeydown http://localhost:8888/static/lab/jlab_core.e1a913e5a1839ee16b95.js:4660:23
Array +2 [StackItem, ...]
UndoManager.afterTransactionHandler  http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:5030:15
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.forEach <anonymous>
webpack://jupyterlab/node_modules/lib0/observable.js:73:62
Array.<anonymous> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4693:27
webpack://jupyterlab/node_modules/lib0/function.js:19:0
cleanupTransactions http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4695:62
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4810:9
Doc.transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:2023:5
Array +13 [Item, ...]
addStruct                    http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4268:11
Item.integrate http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:11054:7
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6617:22
Array.forEach <anonymous>
typeListInsertGenericsAfter http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6590:11
typeListInsertGenerics http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6677:10
<unknown> http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6996:9
transact http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:4796:5
YArray.insert http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:6995:7
Set +2 Set((anonymous function), ...)
                          webpack://jupyterlab/node_modules/lib0/observable.js:30:56                                                                                     
Doc.on http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:2182:11
new UndoManager http://localhost:8888/static/lab/vendors-node_modules_yjs_dist_yjs_mjs.4fbeace2166db933a6e2.js:5050:14
YCodeCell.setUndoManager http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:398:33
<unknown> http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1584:15
Array.forEach <anonymous>
YNotebook.insertCells http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1583:16
YNotebook.insertCell http://localhost:8888/static/lab/vendors-node_modules_jupyter_ydoc_lib_index_js-node_modules_process_browser_js.fc8babfba933ff460960.js:1564:21
webpack://jupyterlab/packages/notebook/src/actions.tsx:404:22
- Drag and drop a cell

File editor memory leaks

Create a file Memory change: -79.3 kB Leak detected: No

Leaking objects:

Object # added Retained size increase
Detached HTMLUListElement 1 +3.13 kB
Detached V8EventHandlerNonNull 1 +40 B
VirtualElementPass 1 +46 B
Detached HTMLButtonElement 2 +23.7 kB
Detached SVGCircleElement 2 +1.1 kB
HTMLDivElement 2 +324 B
LabIcon 2 +1.07 kB
Detached CSSStyleDeclaration 3 +232 B
Detached HTMLLIElement 3 +5.96 kB
Detached NodeList 3 +192 B
NavigationHistoryEntry 3 +720 B
VirtualText 3 +110 B
Detached SVGGElement 4 +2.94 kB
VirtualElement 4 +1.04 kB
Detached SVGAnimatedPreserveAspectRatio 5 +320 B
Detached SVGAnimatedRect 5 +320 B
Detached SVGPathElement 5 +1.77 kB
Detached SVGSVGElement 5 +8.03 kB
Detached HTMLSpanElement 6 +2.33 kB
Detached DOMStringMap 7 +428 B
Detached SVGAnimatedNumber 7 +448 B
Detached Attr 10 +720 B
Detached Text 10 +920 B
Detached HTMLCollection 13 +1.42 kB
Detached DOMTokenList 14 +916 B
Detached HTMLDivElement 15 +33.4 kB
Detached SVGAnimatedString 16 +896 B
Detached SVGAnimatedTransformList 16 +1.02 kB
Detached SVGAnimatedLength 26 +1.66 kB
Detached V8EventListener 130 +10.9 kB
Detached EventListener 131 +20.4 kB
(closure) 138 +17.1 kB
✔ Opening a text file (68345ms)

Notebook memory leaks

Create a notebook Memory change: +32.8 kB Leak detected: Yes

Leaking objects:

Object # added Retained size increase
Detached HTMLUListElement 1 +2.31 kB
Detached V8EventHandlerNonNull 1 +40 B
VirtualElementPass 1 +55 B
Detached HTMLButtonElement 2 +23.7 kB
Detached SVGCircleElement 2 +1.1 kB
HTMLDivElement 2 +74 B
LabIcon 2 +935 B
Detached CSSStyleDeclaration 3 +240 B
Detached HTMLLIElement 3 +6.08 kB
Detached NodeList 3 +216 B
NavigationHistoryEntry 3 +720 B
VirtualText 3 +109 B
VirtualElement 4 +1.21 kB
Detached SVGAnimatedPreserveAspectRatio 5 +320 B
Detached SVGAnimatedRect 5 +320 B
Detached SVGSVGElement 5 +9.29 kB
Detached HTMLSpanElement 6 +3.1 kB
Detached SVGGElement 6 +4.9 kB
Detached SVGPathElement 7 +2.47 kB
Detached SVGAnimatedNumber 9 +576 B
Detached Attr 10 +720 B
Detached Text 10 +748 B
Detached HTMLCollection 13 +1.44 kB
Detached DOMTokenList 15 +1.04 kB
Detached HTMLDivElement 15 +33.5 kB
Detached SVGAnimatedString 20 +1.12 kB
Detached SVGAnimatedTransformList 20 +1.28 kB
Array 22 +24.3 kB
Detached SVGAnimatedLength 26 +1.66 kB
DOMRectReadOnly 30 +1.68 kB
Detached V8EventListener 130 +10.9 kB
Detached EventListener 131 +20.4 kB
(closure) 138 +33.7 kB
✔ Opening a notebook (72242ms)

2 passing (6m)
1 pending
1 failing

   Adding a cell:

  Create a code cell - Objects leaking
  + expected - actual

  -1357
  +1308
  
  at file:///home/runner/work/_actions/jupyterlab/benchmarks/v1/memory-leaks/tests/utils.mjs:43:16
  at Array.forEach (<anonymous>)
  at expectNoLeaks (file:///home/runner/work/_actions/jupyterlab/benchmarks/v1/memory-leaks/tests/utils.mjs:28:11)
  at testScenario (file:///home/runner/work/_actions/jupyterlab/benchmarks/v1/memory-leaks/tests/utils.mjs:230:3)
  at async Context.<anonymous> (file:///home/runner/work/_actions/jupyterlab/benchmarks/v1/memory-leaks/tests/cell.test.mjs:7:5)

fcollonval added a commit to fcollonval/jupyterlab that referenced this pull request Mar 17, 2023
* Fixes saving with the same name

* Review

* Add test for dismissed save as dialog

---------

Co-authored-by: Frédéric Collonval <fcollonval@gmail.com>
(cherry picked from commit b80523f)
fcollonval added a commit that referenced this pull request Mar 17, 2023
* Fixes saving with the same name

* Review

* Add test for dismissed save as dialog

---------

Co-authored-by: Frédéric Collonval <fcollonval@gmail.com>
(cherry picked from commit b80523f)
@hbcarlos hbcarlos deleted the follow_up_14182 branch March 20, 2023 09:27
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants