-
Notifications
You must be signed in to change notification settings - Fork 56
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 #30
base: master
Are you sure you want to change the base?
Performance #30
Conversation
可以直接使用了 Sent from my iPhone
|
还有优化空间 |
这个PR等等再合并哈,下周有时间再搞搞 |
多余的 commits rebase 合并掉 |
// do nothing | ||
} else if (utilx.isString(context)) { | ||
} else if (_.isString(context)) { |
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.
可以试试 node 自带的 utils https://iojs.org/api/util.html#util_util_isstring_object
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.
nodejs里没有,现在只有iojs里有,等以后新版本应用多了再试。lodash已经优化的不错了
isObject 判断,可以使用最高效的方式: 而且我们如果已经判断了不是数组,后面一步也没必要了 |
lodash里的isObject也是这么做的。你说的几个我再改改看看性能提升 |
…of velocity rendering improves to half of that of nunjucks
这个还没合 |
ms 邵帅说他再改改,然后我就忘记关注了 |
compile
method to support simple precompiling. More work should be done to achieve further performance improvement.