Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.
-
I don't know how or why but whenever I start an emoji colon, the popup happens, and the the browser just 100%CPUs for a while.
In Inspector, all I see is a dozen or so GET requests getting the images. Each take over a second to return sometimes. So I assume there's some NodeBB shittery going on with the response for the GET?
Or is there a hidden firefox setting I don't know about that says "If there's more than X concurrent requests fucking deadlock like a shitter for 20 seconds"?
-
@lorne-kates said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
concurrent requests fucking deadlock
I thought Firefox was single-threaded?
-
@lorne-kates As far as I know, it's done that since the start. It's been complained about before, as I recall. :/
-
@lorne-kates said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
emoji
paging @PitaJ
-
@lorne-kates why not just use Chrome then?
-
@pie_flavor said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
@lorne-kates why not just use Chrome then?
oh you dunnit now...
-
@erufael said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
@lorne-kates As far as I know, it's done that since the start. It's been complained about before, as I recall. :/
I've certainly complained about it before, but it hasn't been doing that from the start. It started 2 or 3 updates ago.
It's strange, but I liked NodeBB more right after we switched to it than I do now.
-
@lorne-kates said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
Or is there a hidden firefox setting I don't know about that says "If there's more than X concurrent requests fucking deadlock like a shitter for 20 seconds"?
-
@boomzilla OK, but seriously, I don't see this behavior here on FF 58.0.1 (64 bits, Linux).
-
@zecc said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
I've certainly complained about it before, but it hasn't been doing that from the start. It started 2 or 3 updates ago.
I posted about this more than a year ago
-
What the fuck has happened to this thread?
Persists across refreshes, and doesn't affect other threads
-
@bb36e said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
@zecc said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
I've certainly complained about it before, but it hasn't been doing that from the start. It started 2 or 3 updates ago.
I posted about this more than a year ago
I'm at a loss then.
-
Happened to me the other day, too. I could only replicate it by typing a shortcut for an emoji that doesn't exist. I did something like :bunch_of_arrows: yep that freezes it up.
-
@mott555 said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
I did something like :bunch_of_arrows: yep that freezes it up.
ditto here. to be fair, emoji autocompletion is believed to be an NP-complete problem, I believe donald knuth is writing a paper that proposes a faster solution
-
@jaloopa said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
Persists across refreshes, and doesn't affect other threads
the bug report tool has a bug
-
@pie_flavor said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
@lorne-kates why not just use Chrome then?
not even as a joke, dude.
-
@bb36e said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
to be fair, emoji autocompletion is believed to be an NP-complete problem, I believe donald knuth is writing a paper that proposes a faster solution
It's certainly in NP. I'd give you my proof for it being NP-complete, but I'm a bit busy trying to collect my $1m check first.
Filed under: the joke works if the hierarchy collapses.
-
@mott555 said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
Happened to me the other day, too. I could only replicate it by typing a shortcut for an emoji that doesn't exist. I did something like :bunch_of_arrows: yep that freezes it up.
Ah, yes, that does it.
-
@boomzilla said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
@boomzilla OK, but seriously, I don't see this behavior here on FF 58.0.1 (64 bits, Linux).
❯ /opt/firefox/firefox --version Mozilla Firefox 58.0.1
Not quite frozen, but that was me typing at a pretty normal pace, and it took almost a second for each letter to actually show up.
-
The moment when my mouse starts moving is when I took my hands off the keyboard:
-
@lorne-kates said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
@pie_flavor said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
@lorne-kates why not just use Chrome then?
not even as a joke, dude.
y tho
-
@bb36e said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
@mott555 said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
I did something like :bunch_of_arrows: yep that freezes it up.
ditto here. to be fair, emoji autocompletion is believed to be an NP-complete problem, I believe donald knuth is writing a paper that proposes a faster solution
Simple. Dropping support for emoji reduces the complexity to O(1).
-
@onyx You must just be doing it wrong.
Either that, or Firefox is.
-
@pie_flavor said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
@onyx You must just be doing it wrong.
Either that, or Firefox is.When it comes to NodeBb, it's never "the browser is dOing it wrong"
It is always "NodeBb is doing it in the most complicated dumb shit way imaginable, but it worked on the devs machine so...."
Every. Fucking. Time.
-
@lorne-kates You know what else it works on?
Spoiler
-
@ben_lubar try updating to the latest version of the plugin if you haven't already. Should be v2.1.0
Edit: might not fix the "emoji that doesn't exist issue" I'll see what I can do about that.
I'm on FF Nightly and can't reproduce the lockup, but it is noticeably slow while typing :thing_that_doesn't_exist:
-
@pitaj said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
try updating to the latest version of the plugin if you haven't already
2.0.9 is the latest the admin panel will let me see.
-
@pie_flavor said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
@lorne-kates You know what else it works on?
Spoiler
It works so well you had to edit your post? Twice?
-
-
@pie_flavor said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
Just don't do that on a post with a onebix or you'll crash the entire internet
-
@ben_lubar Ok so after looking into this a little more it appears that the fuzzy search library, when no close enough results are found (like in the case of
:thing_that_doesnt_exist:
), works really hard searching through the entire dataset. I'm trying to figure out some remedy for this besides writing the fuzzy finder myself or using an algorithm without Levenshtein distance.
-
@pitaj said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
@ben_lubar Ok so after looking into this a little more it appears that the fuzzy search library, when no close enough results are found (like in the case of
:thing_that_doesnt_exist:
),works really hard searching through the entire datasetshould have a configurable for "just give up" . I'm trying to figure out some remedy for this besides writing the fuzzy finder myself or using an algorithm without Levenshtein distance.FTFY.
Though in seriousness it sounds like the algorithm isn't doing any kind of caching for some reason? Why the F not?
-
I just typed an emoji's code into the browser search bar and cut+pasted to the composer panel. I was 100000% times faster because it didn't trigger the emoji picker.
-
@zecc Really must be a Firefox thing, then. Because the emoji picker itself lags, but it does not cause the text field to lag, when using Chrome.
-
@pitaj said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
@ben_lubar Ok so after looking into this a little more it appears that the fuzzy search library, when no close enough results are found (like in the case of
:thing_that_doesnt_exist:
), works really hard searching through the entire dataset. I'm trying to figure out some remedy for this besides writing the fuzzy finder myself or using an algorithm without Levenshtein distance.AFAICT the emoji dataset is large-ish, but not large for a computer.
Going through the entire dataset and computing a match score is still linear in the number of entries (assuming the length of individual entries is short enough to neglect), thresholding a score and sorting the matches is also fast.
What other stuff is it doing that makes it slow?
-
I haven't got any video recording capability here but Chrome on Win7 shits itself for a few seconds when typing an emoji that doesn't exist, like in @bb36e 's video.
-
@topspin Yeah it would be nice to have an option for that.
I'm not sure exactly, but it could be doing things like falling back on bigrams instead of trigrams, which is like doing the whole thing again. I'd have to learn how the whole library works before I can answer why this is happening.
It might be possible to limit the search to the first few characters, or to not search at all if no results were found in the previous search. I haven't found any other fuzzy finder libraries for JS that support the Levenshtein distance, or I'd switch to that.
-
@zecc said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
100000% times faster
1000 times faster?
-
@pie_flavor said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
@zecc Really must be a Firefox thing, then. Because the emoji picker itself lags, but it does not cause the text field to lag, when using Chrome.
Speak for yourself! Merely typing can be lagging, especially for posts with embeds because some event handler synchronously updates the preview window (even if it's hidden) after a few keystrokes.
-
@ben_lubar said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
@zecc said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
100000% times faster
1000 times faster?
I see you've chosen to ignore my
abbr[title]
.
-
@zecc but that is how percents work.
%
is just a constant equal to 0.01.
-
I disagree. I don't have 20600% bones in my body.
A % marks a percentage, and a percentage is always the ratio between two specific quantities of the same particular kind.
Generally what exactly these quantities refer to is strongly implied by context, but that's not always the case.A "10% increase" should be read as
(new quantity-old quantity) / old quantity == 0.10
, ornew quantity == 1.10 x old quantity
.100000% times would be something like "take your original quantity N, multiply it by 1000 and calculate N times that amount "; ie 1000.N2.
And now you've made me kill the joke.
Edit: missed opening paren
-
@zecc percent is a unit-less ratio multiplier, like radians and degrees. So if you say "thing X is 1000% of thing Y" then it implies that thing X and thing Y have equal units.
You could say "I have 100% more apples than you have oranges" which just means I have twice the number of apples as you have oranges. Colloquially, it's almost never used this way.
-
@bb36e Well, the actual emote is called so...
-
@pitaj said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
the fuzzy search library
https://memegenerator.net/img/instances/500x/79804241/theres-your-problem-right-there.jpg
IIRC this mess all started when the emoji popup stopped filtering things properly. Please fix it.
-
-
@pitaj Nope. It's still giving incorrect results in the filtering.
-
@pitaj said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
emoji popup stopped filtering things properly
I fixed this.
examples
:circle_down
Were you also able to fix the drop-down not properly dropping up when necessary?
-
@masonwheeler please provide examples of this happening.
@Tsaukpaetra The dropdown thing isn't implemented by the emoji plugin. It is exposed by the composer and merely used by the emoji plugin. I'll see if I can get that fixed though.
@ben_lubar might help if you didn't have over 3500 individual emoji (not judging)
(async function () { const table = await $.getJSON('/plugins/nodebb-plugin-emoji/emoji/table.json'); console.log(Object.keys(table).length); })()
Compare that to https://community.nodebb.org with less than 1400.
Also, you may want to only include image files in your emoji pack, at the moment
dictionary.json
is included as an emoji, which results inundefined
::dictionary:
As for the v2.1.0 thing, you should use https://github.com/NodeBB/NodeBB/commit/d7722de21090e5dce31631b45ff130b56806e007 which should update you to latest emoji plugin version, and allow you to use newer version in the future without NodeBB complaining.
That will disable the "solo colon triggering emoji autofill" annoyance. Also adds the
emoji
class to every emoji so you can ditch the MutationObserver (assuming it's still there).Edit: also just noticed that emoji are linkified, if you know why that's happening let me know I'd like to add it to FAQ.
Edit2: it's also possible but untested to use fonts with the emoji plugin, I might mess around and build a pack which adds fontawesome icons using the existing font included with NodeBB
-
@pitaj said in Useless piece of shit emoji picker deadlocks browser for 15 seconds per keystroke.:
@masonwheeler please provide examples of this happening.
The text after the colon does not match any emoji, and yet it returns a bunch of random matches rather than none. This is incorrect filtering. Please fix it.