-
Notifications
You must be signed in to change notification settings - Fork 150
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
IE7加载性能问题 #199
Comments
@China-Boy-1985 一般是列表问题 list 看下能否 使用 嵌套组件 看能否使用 isolate 进行隔离
@China-Boy-1985 |
目前这边主要是需要兼容IE7,而您的这个框架的兼容性目前也是很吻合的。就以上所说的优化方式除外还有其它方式么? |
@China-Boy-1985 可以看下页面么? |
<div id="container"></div>
<script type="template/regular">
<form action="">
<div class="group-container">
{if x === 1}
<div class="form-group">
<rg-xx></rg-xx>
</div>
{/if}
{if a === 1}
<div class="form-group">
<rg-aa></rg-aa>
</div>
{/if}
{if b === 1}
<div class="form-group">
<rg-bb></rg-bb>
</div>
{/if}
{if c === 1}
<div class="form-group">
<rg-cc></rg-cc>
</div>
{/if}
{list}
<div>
代码块
{list}
<div>代码块</div>
{/list}
</div>
{/list}
</div>
</form>
</script> |
代码结构大致是上面这样的,然后inject到container。regular实例里面还有很多逻辑处理。整个页面require的js大概有10几个吧,这边使用的requireJS。在IE7中效率非常的慢。 |
@China-Boy-1985 requirejs 的文件有打包么? 还是都是异步加载的 |
使用gulp打包的,只是没合并而已。使用的require([], function() {})这种方式加载。应该全部是异步加载的。 |
@China-Boy-1985 建议先打包后, 再排查对应Regular性能问题。 排除requirejs本身的问题噪音 |
@China-Boy-1985 然后呢? 后来如何解决的? |
目前我们有一个项目完全使用您的这个框架构建的。所有的组件也都使用regular来完成。整个页面的结构是做一个regular对象来处理的。页面里面又包含了很多小的regular组件,同时还有很多的逻辑处理({if})和遍历({list})。当然我们在list的时候也使用了by item_index。在IE7加载的过程中速度很慢,其它浏览器无加载问题。请问下您这边有什么好的优化建议么?
The text was updated successfully, but these errors were encountered: