-
-
Notifications
You must be signed in to change notification settings - Fork 924
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
Small optimization in render hyperscript.js #2064
Small optimization in render hyperscript.js #2064
Conversation
Generated by 🚫 dangerJS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM mod a small nit
render/hyperscript.js
Outdated
@@ -108,6 +104,7 @@ function hyperscript(selector) { | |||
var normalized = Vnode.normalizeChildren(children) | |||
|
|||
if (typeof selector === "string") { | |||
var cached = selectorCache[selector] || compileSelector(selector) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind combining this with the next line, to save a temporary variable? (Your patch is more so optimizing space than speed, BTW.)
Squashed commits: [5b10329] Small optimization in render hyperscript.js
…magikstm/mithril.js into render-hyperscript-small-update
Thanks for the review. I adjusted it. I'm having trouble to squash commits in github with the command-line tools or SourceTree. :( |
@magikstm The "Sloppy mode" comment was paired with the line you moved. I don't even remember why it's there (I used to, I thought I had made it more meaningful but that PR was probably not merged). |
@pygy The sloppy mode comment was for when the bundler hadn't yet been
patched to emit strict mode bundles instead. Also, since we no longer
support IE9 in `next` (MS dropped support with Vista), we can safely assume
all browsers interpret strict mode directives correctly.
So dropping it is of no concern anymore. (I'm the one who wrote that patch
to repair sloppy mode use, BTW.)
…On Sat, Dec 30, 2017, 17:20 Pierre-Yves Gérardy ***@***.***> wrote:
@magikstm <https://github.com/magikstm> The "Sloppy mode" comment was
paired with the line you moved. I don't even remember why it's there (I
used to, I thought I had made it more meaningful but that PR was probably
not merged).
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#2064 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AERrBIxHg3nVjcQyAf5wImIQBbugunqVks5tFrdCgaJpZM4RPkCs>
.
|
Thanks. I just removed the comment. |
@magikstm If you're okay working from the CLI, there's |
@isiahmeadows I'm not against dropping IE 9 (and 10) support, given how marginal it has become, but I didn't know this was planned. OTOH given the |
@isiahmeadows I'm unfortunately a bit limited with the Git CLI. I use it a bit, but usually use SourceTree. I'm not that used to squashing commits. It's a feature of Git I have to learn more. Could you do it before a merge or after it? |
@pygy MS dropped it with Vista, which EOL'd this year IIRC. We usually
don't bother supporting obscure (e.g. IE7 for Windows POS Ready) or
manufacturer-unsupported operating systems, and that's also why we dropped
IE 6-8 support for 1.x.
Windows 7 isn't EOL until 2020, so it's going to be a while before that
hits.
@magikstm Don't worry too much about the history - some of our own PRs have
been a bit messy history-wise. ;-)
…On Sat, Dec 30, 2017, 19:16 magikstm ***@***.***> wrote:
@isiahmeadows <https://github.com/isiahmeadows> I'm unfortunately a bit
limited with the Git CLI. I use it a bit, but usually use SourceTree. I'm
not that used to squashing commits. It's a feature of Git I have to learn
more.
Could you do it before a merge or after it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2064 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AERrBBJfVQUTtnLC_K6m7N99YjcsUL09ks5tFtJQgaJpZM4RPkCs>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much nicer IMO 👍
Here we go! Thanks @magikstm |
* Small optimization in render hyperscript.js * Remove temporary variable * Small optimization in render hyperscript.js Squashed commits: [5b10329] Small optimization in render hyperscript.js * Remove sloppy mode comment
Description
No functional change. I read code and noticed it.
Motivation and Context
Minor. Feel free to pull or not.
How Has This Been Tested?
Locally.
Types of changes
Optimization.
Checklist:
docs/change-log.md