Giter VIP home page Giter VIP logo

Comments (2)

xzbdmw avatar xzbdmw commented on June 20, 2024

More infomation, nvim-0.10 is much slower than nvim-0.95 for opening buffer,take this init.lua for example

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"

if not vim.loop.fs_stat(lazypath) then
	vim.fn.system({
		"git",
		"clone",
		"--filter=blob:none",
		"https://github.com/folke/lazy.nvim.git",
		"--branch=stable", -- latest stable release
		lazypath,
	})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
	{
		"mrcjkb/rustaceanvim",
		-- version = "^3", -- Recommended
		ft = { "rust" },
	},
})
vim.keymap.set("n", "gd", function()
	vim.lsp.buf.definition()
end)
local start_time = nil
local end_time = nil
vim.api.nvim_create_autocmd("BufLeave", {
    callback = function()
        start_time = os.clock()
    end,
})
vim.api.nvim_create_autocmd("BufEnter", {
    callback = function()
        end_time = os.clock()
        if start_time then
            local elapsed_time = end_time - start_time
            print("Buffer switch time: " .. elapsed_time .. " s")
        end
        
    end,
})

open an simple rust file and put cursor at such as Vec::new, type gd, in 0.10 it takes 0.015s and 0.008s in 0.95 in my mac(without treesiter).
with treesitter enabled, the time is 0.037(0.10) vs 0.020(0.9.5).

from nvim-treesitter.

clason avatar clason commented on June 20, 2024

Highlighting is performed by Neovim, not this plugin, so this is not actionable here. And these steps are much too complex and involve LSP, so are not good regression benchmarks anyway.

from nvim-treesitter.

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.