mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	fix(lsp): improve symbols_to_items performance (#16197)
* use table.insert instead of list_extend to avoid validation overhead Co-authored-by: Gianmarco Fantinuoli <fanto-dev@hotmail.com>
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							69e4cb7116
						
					
				
				
					commit
					5ad15c9fa1
				
			@@ -1722,7 +1722,9 @@ function M.symbols_to_items(symbols, bufnr)
 | 
			
		||||
        })
 | 
			
		||||
        if symbol.children then
 | 
			
		||||
          for _, v in ipairs(_symbols_to_items(symbol.children, _items, _bufnr)) do
 | 
			
		||||
            vim.list_extend(_items, v)
 | 
			
		||||
            for _, s in ipairs(v) do
 | 
			
		||||
              table.insert(_items, s)
 | 
			
		||||
            end
 | 
			
		||||
          end
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user