-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚀 Performance tuning & bugfix #1111
Conversation
@dotcypress just tested here and the performance looks like the same as before 😰 Each braille char is still alone inside its own |
@matheuss yes, we still need to wrap each But now, huge amount of spans created if string contains at least 1 non latin character, see screenshots below, all Currently i'm trying to fix issue with increasing/decreasing font size, stay tuned 😎 |
c2540d9
to
d03668a
Compare
will this fix slow scrolling in for example micro-editor.github.io and slow performance with cat long files? |
@dimitrieh not fully fixed but speed of scrolling is better than in |
@dotcypress whilst this is a clever way of speeding things up, not all characters are displayed as px, which causes layout to break. In my case, I have an emoji in the prompt (OS X, 10.12), and this causes all subsequent characters to be displayed wrongly by about half a character's width (or more). For this solution to work, any special spans should have their width set by either the DOM automatically, or using canvas's text measuring functions, rather than a global special span width. In the screenshot, the cursor is supposed to be right after the -la, but it ends up being an entire character's width off. |
We should look into adding a character measurement cache perhaps?
Thanks for your analysis Adam
…On Sun, Dec 18, 2016 at 10:42 AM Adam Bell ***@***.***> wrote:
@dotcypress <https://github.com/dotcypress> whilst this is a clever way
of speeding things up, not all characters are displayed as px, which causes
layout to break. In my case, I have an emoji in the prompt (OS X, 10.12),
and this causes all subsequent characters to be displayed wrongly by about
half a character's width (or more).
For this solution to work, any special spans should have their width set
by either the DOM automatically, or using canvas's text measuring
functions, rather than a global special span width.
In the screenshot, the cursor is supposed to be right after the -la, but
it ends up being an entire character's width off.
[image: span]
<https://cloud.githubusercontent.com/assets/1981722/21295650/d8833454-c527-11e6-8fd6-579f871f1ca1.png>
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1111 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAy8edVWGOGiuqJ4dHtbunF3r6GiT29ks5rJX6jgaJpZM4LJ2YW>
.
|
perhaps? I'm not entirely sure what the best fix is, I'm not super familiar with current web technologies. I just do know that setting a global CSS style for all specially marked unicode characters won't work. A CSS style for each character should work, but I can see other languages / character sets causing performance to take a nose dive. |
Also, my understanding is that we only need two character classes: single
and double width, since we are dealing with a grid.
…On Sun, Dec 18, 2016 at 10:52 AM Adam Bell ***@***.***> wrote:
perhaps? I'm not entirely sure what the best fix is, I'm not super
familiar with current web technologies. I just do know that setting a
global CSS style for all specially marked unicode characters won't work.
A CSS style for each character should work, but I can see other languages
/ character sets causing performance to take a nose dive.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1111 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAy8V9xYjadF8aGD8aSXPnlS67VC2QWks5rJYDigaJpZM4LJ2YW>
.
|
This sounds way too familiar with what the guys from Atom have been working
on for ages...
El El dom, 18 dic 2016 a las 19:54, Guillermo Rauch <
notifications@github.com> escribió:
… Also, my understanding is that we only need two character classes: single
and double width, since we are dealing with a grid.
On Sun, Dec 18, 2016 at 10:52 AM Adam Bell ***@***.***>
wrote:
> perhaps? I'm not entirely sure what the best fix is, I'm not super
> familiar with current web technologies. I just do know that setting a
> global CSS style for all specially marked unicode characters won't work.
>
>
> A CSS style for each character should work, but I can see other languages
> / character sets causing performance to take a nose dive.
>
>
>
>
> —
> You are receiving this because you modified the open/close state.
> Reply to this email directly, view it on GitHub
> <#1111 (comment)>, or
mute
> the thread
> <
https://github.com/notifications/unsubscribe-auth/AAAy8V9xYjadF8aGD8aSXPnlS67VC2QWks5rJYDigaJpZM4LJ2YW
>
> .
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1111 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAFefwfEljL10r_s8eRRJcOly3rUZ8wGks5rJYFKgaJpZM4LJ2YW>
.
|
Fix unicode performance (cause separated html element per character is too slow)
🙌 Make Hyper fast again!
UPD: 🚨 this PR also will fix > 5 opened issues
@matheuss @codetheory @ppot @rauchg