Firefox 38-40 SMIL problems - very slow speed (resolved in FF version 41 from 22.09.15)

自古美人都是妖i 提交于 2019-12-08 13:50:17

问题


Can you give some information about new versions FF, that passed after version 37.0.2. I knew that most of the bugs in version 38 have been fixed in version 38.0.5. I noticed a difference in the processing speed of the attributes 'animate' and 'animateTransform' in all new versions of FF, and because of this the page becomes really slow. If remove animate tags:

        <rect x="-1.32" y="-0.63" width="3.64" height="1.26" fill="#FFD9D9" stroke-width="0.0" rx="0.12">
            <!--this animation makes half-visible selecting effect -->
            <animate attributeType="CSS" attributeName="opacity" to="0.65" dur="0.5s" begin="mouseover" fill="freeze"></animate>
            <animate attributeType="CSS" attributeName="opacity" to="1" dur="0.5s" begin="mouseout" fill="freeze"></animate>
        </rect>

To this:

        <rect x="-1.32" y="-0.63" width="3.64" height="1.26" fill="#FFD9D9" stroke-width="0.0" rx="0.12">
            <!--no animation -->

        </rect>

Then we lose animate(hover) effects and speed became ok, like it was in old version FF(37.0.2) with(with not removed) animate tags.

I created topic: https://bugzilla.mozilla.org/show_bug.cgi?id=1171966

There were added some examples of code and video to them. The problem of slowness is observed in case of a large number of elements on the page, but only if each of them has the attribute like 'animate'. Maybe alse like this:

        <rect x="-0.5" y="-0.5" width="1" height="1" fill="white">
            <!--it makes half-visible selecting effect -->
            <set attributeName="stroke-opacity" begin="mouseover" end="mouseout" to="0.5"></set>
            <!-- explicitly reverse the opacity animation on mouseout -->
            <set attributeName="stroke-opacity" begin="mouseout" end="mouseover" to="1"></set>
        </rect>

In my case, I use tag to make hover effect and change opacity on mouseover. Not using css, html5, DOM

It would be nice to find similar topics (stackoverflow, bugzilla) or someone who faced this problems too. Thanks


回答1:


This has been fixed in Firefox from version 41 onwards.




回答2:


As Chrome discard high-level support SMIL, and Fire Fox will try to fix this bug for some time(not in vers 39, maybe later), it would be a good idea to use the facilities off CSS and Web animations

Deprecated SMIL SVG animation replaced with CSS or Web animations effects (hover, click)



来源:https://stackoverflow.com/questions/30760923/firefox-38-40-smil-problems-very-slow-speed-resolved-in-ff-version-41-from-22

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!