[BCLOUD-15237] Safari always rerendering causing high cpu usage

            Attachment 3976716861-bitbucket-cpu.jpg has been added with description: Originally embedded in Bitbucket issue #15237 in site/master

            Sébastien Gicquel added a comment - Attachment 3976716861-bitbucket-cpu.jpg has been added with description: Originally embedded in Bitbucket issue #15237 in site/master

            Attachment 1586277165-Screen%20Shot%202017-11-17%20at%209.52.08%20AM.png has been added with description: Originally embedded in Bitbucket issue #15237 in site/master

            BrendonSled added a comment - Attachment 1586277165-Screen%20Shot%202017-11-17%20at%209.52.08%20AM.png has been added with description: Originally embedded in Bitbucket issue #15237 in site/master

            Issue BCLOUD-15402 was marked as a duplicate of this issue.

            Alastair Wilkes added a comment - Issue BCLOUD-15402 was marked as a duplicate of this issue.
            smccullough (Inactive) made changes -
            Status Original: GATHERING IMPACT [ 12072 ] New: CLOSED [ 6 ]

            Fix released by @bgummer on Dec 19th

            smccullough (Inactive) added a comment - Fix released by @bgummer on Dec 19th

            whitby added a comment -

            I can confirm that idle CPU usage has been significantly reduced and I can now use Bitbucket on Safari without issue. Thank you for fixing this and I apologize for being difficult in this thread. I do appreciate the team's work on this issue. ✌🏽

            whitby added a comment - I can confirm that idle CPU usage has been significantly reduced and I can now use Bitbucket on Safari without issue. Thank you for fixing this and I apologize for being difficult in this thread. I do appreciate the team's work on this issue. ✌🏽

            rhiller added a comment -

            It works for me now. Thanks so much.

            rhiller added a comment - It works for me now. Thanks so much.

            Ben G added a comment -

            Hi everyone, just an update to let you know that this issue has been fixed so Bitbucket should no longer fry your CPU on Safari.

            This fix has been tested in Safari 11.0.2, so no need to update or switch browsers.

            Please feel free to comment on this issue if the problem reappears.

            Thanks,
            Ben

            Ben G added a comment - Hi everyone, just an update to let you know that this issue has been fixed so Bitbucket should no longer fry your CPU on Safari. This fix has been tested in Safari 11.0.2, so no need to update or switch browsers. Please feel free to comment on this issue if the problem reappears. Thanks, Ben

            whitby added a comment -

            Hi Jonathan, thanks for sharing an update with us.

            We believe it is a combination of a bug in Webkit/Safari and something in our Atlaskit shared UI library that manifests itself in the high CPU load.

            Webkit has acknowledged and fixed the bug

            In the meantime, the Atlaskit team has also made some changes to the components we use in Bitbucket, and we are working on upgrading these affected components right now, and will be deploying the changes soon. This should mitigate some of the Safari CPU load issues until Apple releases the next version of Safari.

            I can confirm that this does seem to mostly be a WebKit bug in that I can remove instances of calc to lower the CPU usage. On the Bitbucket home page, for example, I can disable the height on .bZuPrG ([1], [2]) and .idKGDF which use calc() for their values. Thanks for linking to that issue and I'll happily await an updated Safari.

            I looked into jQuery, and while it is true we are on an older version of jQuery, it is not the cause of the layout thrashing you're seeing in the Web Inspector.

            I think you maybe meant "it is not the cause of the CPU usage", which, as you revealed, it isn't the main cause of. I do think the layout thrashing is caused by an older (buggy) version of jQuery because that's how the Web Inspector works. Removing {{calc}}s from the page still sees Bitbucket sitting at around 5% CPU usage (sometimes up to 11% in my quick tests) which isn't good (though, admittedly, I may not have noticed until this WebKit bug caused it to spike up). Furthermore behaviour similar to the that in the animation I linked above (intentionally causing a lot of mouse events and thus layout thrashing) causes the site's CPU usage to jump up to anywhere around 20% to 30% which is also not good.

            whitby added a comment - Hi Jonathan, thanks for sharing an update with us. We believe it is a combination of a bug in Webkit/Safari and something in our Atlaskit shared UI library that manifests itself in the high CPU load. Webkit has acknowledged and fixed the bug In the meantime, the Atlaskit team has also made some changes to the components we use in Bitbucket, and we are working on upgrading these affected components right now, and will be deploying the changes soon. This should mitigate some of the Safari CPU load issues until Apple releases the next version of Safari. I can confirm that this does seem to mostly be a WebKit bug in that I can remove instances of calc to lower the CPU usage. On the Bitbucket home page, for example, I can disable the height on .bZuPrG ( [1] , [2] ) and .idKGDF which use calc() for their values. Thanks for linking to that issue and I'll happily await an updated Safari. I looked into jQuery, and while it is true we are on an older version of jQuery, it is not the cause of the layout thrashing you're seeing in the Web Inspector. I think you maybe meant "it is not the cause of the CPU usage", which, as you revealed, it isn't the main cause of. I do think the layout thrashing is caused by an older (buggy) version of jQuery because that's how the Web Inspector works. Removing {{calc}}s from the page still sees Bitbucket sitting at around 5% CPU usage (sometimes up to 11% in my quick tests) which isn't good (though, admittedly, I may not have noticed until this WebKit bug caused it to spike up). Furthermore behaviour similar to the that in the animation I linked above (intentionally causing a lot of mouse events and thus layout thrashing) causes the site's CPU usage to jump up to anywhere around 20% to 30% which is also not good.

            Hello all,

            Thanks for reporting this issue. As a fellow Safari user I certainly feel your pain. We started noticing and getting reports about the high CPU usage after Safari 11.0.2 was released publicly on 6 December 2017. We believe it is a combination of a bug in Webkit/Safari and something in our Atlaskit shared UI library that manifests itself in the high CPU load.

            Webkit has acknowledged and fixed the bug, and this appears to have landed in the current Safari Technology Preview (Release 45). Downloading and using that pre-release version of Safari would be one way to prevent your computer from melting down and saving your laps from getting burnt.

            In the meantime, the Atlaskit team has also made some changes to the components we use in Bitbucket, and we are working on upgrading these affected components right now, and will be deploying the changes soon. This should mitigate some of the Safari CPU load issues until Apple releases the next version of Safari.

            I looked into jQuery, and while it is true we are on an older version of jQuery, it is not the cause of the layout thrashing you're seeing in the Web Inspector.

            Jonathan

            Bitbucket Cloud Developer

            Jonathan Poh (Inactive) added a comment - Hello all, Thanks for reporting this issue. As a fellow Safari user I certainly feel your pain. We started noticing and getting reports about the high CPU usage after Safari 11.0.2 was released publicly on 6 December 2017. We believe it is a combination of a bug in Webkit/Safari and something in our Atlaskit shared UI library that manifests itself in the high CPU load. Webkit has acknowledged and fixed the bug, and this appears to have landed in the current Safari Technology Preview (Release 45). Downloading and using that pre-release version of Safari would be one way to prevent your computer from melting down and saving your laps from getting burnt. In the meantime, the Atlaskit team has also made some changes to the components we use in Bitbucket, and we are working on upgrading these affected components right now, and will be deploying the changes soon. This should mitigate some of the Safari CPU load issues until Apple releases the next version of Safari. I looked into jQuery, and while it is true we are on an older version of jQuery, it is not the cause of the layout thrashing you're seeing in the Web Inspector. Jonathan Bitbucket Cloud Developer

              Unassigned Unassigned
              af4c29b8c1b7 BrendonSled
              Affected customers:
              6 This affects my team
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: