Coder Social home page Coder Social logo

Comments (4)

dstein64 avatar dstein64 commented on June 16, 2024

Hi @OneOfOne. Thanks for reporting the issue.

Is the Vim option mousemoveevent set?

:set mousemoveevent?

I just added a few optimizations (38dd659, 0f286e8, e8befc9). Is the problem resolved?

from nvim-scrollview.

OneOfOne avatar OneOfOne commented on June 16, 2024

It is not set, gonna try with the latest commits.

from nvim-scrollview.

OneOfOne avatar OneOfOne commented on June 16, 2024

Nope, still used 50-100% cpu and can barely move, with the mouse or the keyboard.

You can try locally, I think you might need Lsp setup with tsserver but turning off this addon solves the issue, where running LspStop doesn't change anything.

❯ mkdir /tmp/x && cd /tmp/x
mkdir: created directory '/tmp/x'
❯ yarn add react-native
❯ vim ./node_modules/react-native/index.js

from nvim-scrollview.

dstein64 avatar dstein64 commented on June 16, 2024

Following the steps you posted, I can see that there are many errors, with an entire column of "E" signs created by nvim-scrollview.

However, movements work fine for me without any slowdown.

nvim-scrollview creates floating windows to show the scrollbar and signs. I wonder if the creation of many such windows is causing another plugin to slow down.

Under the same environment, with index.js loaded and LSP and other plugins running, if you disable nvim-scrollview with :ScrollViewDisable, presumably everything works fine. From there, with everything working fine, what happens if you manually create many floating windows? Do you encounter the same slowdown?

The following script creates a floating window for each row.

" create_floats.vim

let height = winheight(0)
let width = winwidth(0)

for row in range(height)
  let buf = nvim_create_buf(v:false, v:true)
  call nvim_buf_set_text(buf, 0, 0, 0, 0, [string(row)])
  let popup = nvim_open_win(buf, 0, {
        \   'relative':  'editor',
        \   'row':       row,
        \   'col':       width - 2,
        \   'width':     2,
        \   'height':    1,
        \   'focusable': v:false,
        \   'style':     'minimal',
        \ })
endfor

The script can be sourced from the index.js buffer.

:source /path/to/create_floats.vim

Separately, if you load a large file without using LSP, but there are still many scrollview signs, do you still encounter the issue? This scenario can be tested with the following commands, which loads the builtin.txt help file (which is large) and creates many textwidth signs (if you don't see these, then the steps aren't functioning as intended).

:help builtin.txt
:only
:ScrollViewEnable
:ScrollViewEnable textwidth
:set textwidth=1

from nvim-scrollview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.