Minor UI performance improvements #89
Loading…
Reference in a new issue
No description provided.
Delete branch "vib/FoundKey:perf/emoji-picker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Just merged a few commits from Misskey which contain minor UI performance improvements.
One of them improves the emoji picker's search speed, which should solve issue #72.
(this is the first time I PR something, hope I didn't do anyting wrong..^^;)
Just for my (and others) understanding: The (S)CSS style changes can't really change the performance much. So what matters here must be the added
v-once
s which tell Vue to not re-render that tag/component ever.But I'm not opposed to adding class names that make sense to things instead of having selectors based on the tag name so that part is probably nice to have too.
From my side there's only one thing to fix: Please translate the added comment in
packages/client/src/components/emoji-picker.section.vue
to English. We shouldn't add even more Japanese comments.The main issue with using classes this way is that they take up the global namespace (i.e if we want to have a global "body" class at some point, it will conflict). Scoped SCSS works the way it does as-is, so unless there's a huge measurable performance improvement, I'd rather not.
It is actually possible for the emoji part specifically to change the performance a lot though, since applying some styling to thousands of emojis one by one in a linear search would be a lot slower - so I do actually suggest trying to measure it.
The
v-once
is non-controversial though, since refreshes are already required for new emojis to show up. If it was this change alone I would just merge it ASAP.Another optimization would be the selection code (looking at it, it's rather poor) - I'll try and tackle that today (whenever I have time).
yeah, sorry, I kinda took those commits for granted.
So, dump everything except v-once and the emoji class (if the emoji class does prove to be any worth after testing)?
c3ebecfc0c
to62ff65fbf4
well, the using the emoji class probably doesn't change much. I just added the v-once things now.
Also I hope me doing a git reset and force push in this case isn't.. wrong. I thought if this is all I am going to add there is no reason to have syuilo's commits in between.
Still learning the ettiquete of dealing with a project..
Works on my testing setup. Further optimizations can be done in a separate PR.