Commit Graph

20 Commits

Author SHA1 Message Date
yioneko
1a1d7ecb73 perf: improve for source providing huge list of items (#1980)
* perf: avoid creating closure in cache.ensure and drop some cached getters

This mainly addresses the perf issue on large amount of calls to
`entry.new`. Previously every `cache.ensure` calls in the code path of
it creates an anonymous function, and it seems that luajit just could
not inline it. Function creation is not expensive in luajit, but that
overhead is noticeable if every `cache.ensure` call creates a function.
The first improvemnt is to solidate the cache callback and attach it to
the metatable of `entry`. This ensures that every created entry instance
share the same cache callback and no new functions will be frequently created,
reduces the ram usage and GC overhead.

To improve it further, some frequently accessed fields of entry like
`completion_item` and `offset` is refactored to use simple table access
instead of getter pattern. The current cached getter is implemented
using `cache.ensure`, which introduces two more levels of function calls
on each access: `cache.key` and `cache.get`. The overhead is okay if but
noticeable if entries amount is quite large: you need to call 4 functions on
a simple `completion_item` field access for each item.

All of the changes done in the commit is just constant time
optimization. But the different is huge if tested with LS providing
large amount of entries like tailwindcss.

* perf: delay fuzzy match on displayed vim item

`entry.get_vim_item` is a very heavy call, especially when user do
complex stuff on item formatting. Delay its call to window displaying to
let `performance.max_view_entries` applied to it.

* remove unneeded fill_defaults

* update gha

---------

Co-authored-by: hrsh7th <629908+hrsh7th@users.noreply.github.com>
2024-10-20 13:28:20 +09:00
Alejandro
538e37ba87 feat(ci): update luarocks-tag-release to latest version (#1776) 2023-12-14 17:06:53 +09:00
Marc Jakobi
c3f7c54f6e ci: add release workflow to publish new tags to LuaRocks (#1431)
Co-authored-by: hrsh7th <629908+hrsh7th@users.noreply.github.com>
2023-05-01 23:51:18 +09:00
NAKAI Tsuyoshi
339186c979 fix CI (#1462) 2023-02-27 15:28:01 +09:00
hrsh7th
8868cf9a09 Delete FUNDING.yml 2022-12-20 23:27:27 +09:00
hrsh7th
6e1e386515 Update bug_report.yml 2022-05-18 12:15:11 +09:00
OKURA Masafumi
7903e867b6 Change URL of FAQ in bug_report (#867)
The link was invalid.
2022-04-08 22:10:01 +09:00
hrsh7th
82738dc16a Update bug_report.yml 2022-04-08 22:07:19 +09:00
hrsh7th
f66f7e486f Update bug_report.yml 2022-04-08 22:06:32 +09:00
hrsh7th
3fa777ac6b Update issue template 2022-04-08 22:04:26 +09:00
hrsh7th
27970d8a1c Update bug_report.yml 2022-04-06 10:33:08 +09:00
hrsh7th
f4bb6ffdb1 Improve keymap (#768)
* Improve keymap

* improve

* rename

* Add tests

* Use nightly for testing

* Enable failing test

* Add manual test case
2022-01-31 14:16:48 +09:00
hrsh7th
8ffaeffa9d Update issue template 2021-12-13 13:14:53 +09:00
hrsh7th
793b4454f8 Update issue template 2021-12-13 13:12:28 +09:00
hrsh7th
3d74fa77f2 Update issue template 2021-12-13 13:11:22 +09:00
Domagoj
d12ba90da3 feat: add issue template (#604) 2021-12-04 13:37:19 +09:00
hrsh7th
538bfacc15 Update issue templates 2021-10-26 20:53:48 +09:00
Abouzar Parvan
fe964405ff install stylua without cargo (#54)
* install stylua without cargo

* move stylua to path

* add required permissions for stylua

* run stylua from utils dir
2021-08-25 03:49:55 +09:00
hrsh7th
d23d3533cf dev (#1)
* dev

* Improve sync design

* Support buffer local mapping

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* stylua

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* integration

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* update

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp

* tmp
2021-08-04 01:07:12 +09:00
hrsh7th
b32a6e7e77 Create FUNDING.yml 2021-07-01 15:17:50 +09:00