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

Bug: ram usage spikes when scrolling #45

Open
iaurman opened this issue Jan 20, 2023 · 2 comments
Open

Bug: ram usage spikes when scrolling #45

iaurman opened this issue Jan 20, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@iaurman
Copy link

iaurman commented Jan 20, 2023

Describe the bug
Neovim ram usage spikes when scrolling with Colorizer plugin loaded. This behavior disappears when Colorizer is not loaded.

To Reproduce

  1. Using neovim with nvim-colorizer.lua loaded to open a file
  2. Open another terminal running htop to monitor the ram usage of this neovim process. At this point it should be 20MB or so.
  3. On neovim, use your mouse to scroll
  4. You can see on htop that the ram goes up to about 200MB. If the file is long enough and you keep scrolling, it would go up to a few GBs easily and fast. Until it's got terminated by 00ram killer.

Expected behavior
Not taking so much ram.

Operating System:
Arch Linux x86_64

Neovim Version:
NVIM v0.8.2

Colorizer Version:
760e27d 3 months ago

Config Content

require("colorizer").attach_to_buffer(0, { mode = "background", css = true})
require("colorizer").setup {
    filetypes = { "*" },
    user_default_options = {
        RGB = true, -- #RGB hex codes
        RRGGBB = true, -- #RRGGBB hex codes
        names = false, -- "Name" codes like Blue or blue
        RRGGBBAA = true, -- #RRGGBBAA hex codes
        AARRGGBB = true, -- 0xAARRGGBB hex codes
        rgb_fn = true, -- CSS rgb() and rgba() functions
        hsl_fn = true, -- CSS hsl() and hsla() functions
        css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
        css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
        -- Available modes for `mode`: foreground, background,  virtualtext
        mode = "background", -- Set the display mode.
        -- Available methods are false / true / "normal" / "lsp" / "both"
        -- True is same as normal
        tailwind = true, -- Enable tailwind colors
        virtualtext = "■",
    },
    -- all the sub-options of filetypes apply to buftypes
    buftypes = {},
}
@iaurman iaurman added the bug Something isn't working label Jan 20, 2023
@Akianonymus
Copy link
Collaborator

How big is this file ? I just scrolled through a 35k line file, it went to 90mb ( which is intented ), but nowhere near ooming

@Akianonymus
Copy link
Collaborator

out.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants