-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
widgets.sidebar.toggle() causes incremental lag (js-debug-adapter) #1176
Comments
This issue was mentioned on this discussion: #1171 |
Looks like this might be a js-debug-adapter specific issue, see: microsoft/vscode-js-debug#2119 |
Is it? I'm still able to reproduce it even after installing the vscode-js-debug commit that supposedly fixes the performance issue 😢 |
Just had a closer look and seems like any slowdown in the adapter is indeed not the problem. toggling the scopes view doesn't re-request data, but just renders out the frame. But I also can't reproduce it. You could try running something like: require("jit.p").start("Fri2", "/tmp/profile")
for i = 1, 100 do
vim.cmd("DapSidebar") -- adapt as needed to toggle the sidebar
vim.cmd.redraw()
end
require("jit.p").stop() To get some profiling data. |
Thank you for further trying to fix this. Let me say I believe this issue is totally reproducible, at least by the steps I provided above (I just updated the description to use This is the output I'm getting from your suggested snippet, let me know if you see anything strange:
local widgets = require("dap.ui.widgets")
local scopes_sidebar = widgets.sidebar(widgets.scopes, { number = true, wrap = false })
vim.keymap.set("n", "<leader>ds", function()
require("jit.p").start("Fri2", "/tmp/profile")
for i = 1, 100 do
scopes_sidebar.toggle()
vim.cmd.redraw()
end
require("jit.p").stop()
end, { desc = 'DAP: Toggle "scopes" in sidebar' })
33 repro.lua:75
5 ui.lua:render
3 _editor.lua:cmd
2 widgets.lua:456
I'm using Can you revisit the repro steps? simplescreenrecorder-2024-12-06_22.25.09.webm |
Maybe the sidebar buffer is too large? too many lines? How can I disable all the highlights from that sidebar buffer to see if there's any improvement? |
Using the same The issue seems to only happen with long |
Debug adapter definition and debug configuration
Notice how toggling the sidebar gets more and more slow (I'm toggling it at a fast speed but it doesn't respond)
nvim-dap-sidebar-2024-03-23_21.54.13.webm
Debug adapter version
js-debug-adapter 1.95.0 (latest)
nvim nightly
Steps to Reproduce
Create and start a dummy react app (javascript)
npm create vite@latest vite-project -- --template react cd vite-project npm install npm run dev
Reproduction steps on Neovim
repro.lua
code snippet and open nvim withnvim --clean +'so repro.lua'
and wait for plugins to get automatically installedMasonInstall js-debug-adapter
App.js
file onvite-project/src/App.jsx
lua require'dap'.toggle_breakpoint()
:lua require'dap'.continue()
<leader>ds
multiple times. Repeat this keymap until you notice the slow down.Expected Result
Toggling shouldn't get more slow the more you execute it
Actual Result
Toggling the sidebar get more slow the more you use it
The text was updated successfully, but these errors were encountered: