4 ms·
And it made the site super sluggish. Guess that huge regex needs a dedicated cpu. Almost un readable on a fairly quick phone...
by hougaard 10y ago
And it made the site super sluggish. Guess that huge regex needs a dedicated cpu.
Almost un readable on a fairly quick phone...
- lucideer 10y agoSite works with no lag on my low end android. Someone else commented on issues on iPhone6 so possibly a Safari-specific bottleneck being hit.
- yxlx 10y agoHello, Firefox on Android user here on a tablet from circa 2012. Extreme lag, unlike most websites. There are definitely unacceptable performance issues with the syntax highlighter javascript. It looks great, it's a cool project, but it is not suitable for use anywhere.
- STRML 10y agoLooks like the `overflow:auto` on the page container div, not actually anything to do with the library.
- mcbits 10y agoIs it really the regex causing the lag? I haven't jumped into the code yet, but I would expect (or at least hope) the highlighter runs once and the lag is due to whatever DOM/styles it's generating.
- jaytaylor 10y agoDisclaimer: This is not my library, this is what I've gleaned from reading the code. I could always be wrong! It actually can use RegExp's, but they're only being used to locate the language primitive types words (e.g. char, wchar_t, etc..). Most of the library is actually written as a hand-implemented state machine rather than relying on regular expressions.