vueform / multiselect

Vue 3 multiselect component with single select, multiselect and tagging options (+Tailwind CSS support).
https://vueform.com
MIT License
807 stars 150 forks source link

perf: Improved performance and reduced memory consumption #411

Closed negezor closed 5 months ago

negezor commented 5 months ago

Hello. I profiled my application to eliminate micro lags in a large table. There are 3 fields in it that are Multiselect with a large number of options, and 100 rows per page. The table is reactive and updated via WebSocket, but each update was accompanied by micro lags, especially noticeable on mobile devices.

After reviewing the code, I identified several opportunities for improvement, here are some of them:

After these changes and subsequent profiling, I conclude that the micro lags have disappeared, the average memory consumption per page has decreased, the page opening time has become approximately twice as fast on mobile devices, and the INP metric has also improved.

adamberecz commented 5 months ago

Impressive - thanks. These definitely improves the lib's performance.