question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Performance degradation on 1.8.0 and newer versions

See original GitHub issue

Describe the bug Performance degradation introduced on version 1.8.0 and replicable on newer versions as well

To Reproduce Steps to reproduce the behavior:

  1. Create a long pad (e.g. over 4.000 lines)
  2. Press ENTER on the beginning of the pad to create a new line
  3. Long time processing the change

Expected behavior The creation of the new line pressing ENTER should be much faster. As a baseline we can use the version 1.7.5.

Screenshots

1. The old way to deal with iframe height

This is the code that I suppose it was changing the height of the “ace2_inner” iframe on versions older than 1.8.0 Screen Shot 2020-08-26 at 10 50 48 https://github.com/ether/etherpad-lite/blob/1.7.5/src/static/js/ace2_inner.js#L4817

2. The new approach

As the screenshot shows there is not height style defined on the iframe. Its size is defined by the size of #sidediv children. This is possible because it uses flexbox. Screen Shot 2020-08-26 at 12 13 26

3. Video of 1.7.5 and 1.8.4 edition with the same text

https://youtu.be/LpthRFAH3GM please, try to hear when I type

Desktop (please complete the following information):

  • Windows, MacOS, Ubuntu
  • Google Chrome Version 84.0.4147.135

Smartphone (please complete the following information):

I didn’t test on any smartphone

Additional context

The main problem is due to the cost of reflow (check next session). That means that with more complex CSS rules the delay will increase. If we set the #sidediv to display:none that delay does not happen anymore but we cause a problem with the size of the “ace2_inner” as it’s written here https://github.com/ether/etherpad-lite/blob/develop/src/static/css/iframe_editor.css#L125 On both versions I’m running without any plugin.

Chrome dev-tools report for operation shown on the video

1.7.5

graph175 functionCall175

1.8.4

the rendering time increased a lot graph184 look how long takes the “Layout” operation functionCall184

Some interesting articles about the Theme

  1. https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing

  2. https://gist.github.com/paulirish/5d52fb081b3570c81e3a

  3. https://gist.github.com/paulirish/5d52fb081b3570c81e3a#more-on-forced-layout

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:27 (27 by maintainers)

github_iconTop GitHub Comments

3reactions
seballotcommented, Aug 30, 2020

Hi guys ! thanks for this very clear bug report @joassouza, and sorry for the bug

I’m sorry I’m very focused on other project right now, I’ll try to have a close look on this ticket on next week. But if anyone want to try to solve be my guest !!

1reaction
seballotcommented, Sep 8, 2020

Ok done ! actually it was not very complicated, thanks to @joassouza who made all the work of finding both problem and solution

Read more comments on GitHub >

github_iconTop Results From Across the Web

7550 Degraded Performance After Bios 1.8.0 Upgrade - Dell
Solved: I9-10885H @2.4Ghz/32GB Ram After BIOS Upgrade from 1.7.0 to 1.8.0 Performance of PC seriously affected, down by 3-4 times CPU.
Read more >
Found regression on ORT 1.8.1 - microsoft/onnxruntime - GitHub
Describe the bug. Hello! Found the performance issue in new ORT 1.8.1. New ORT 1.8.1 is slower than 1.8.0 ~5-6 times. Urgency
Read more >
Known Issues for JDK 8 - Oracle
This document describes known issues in the Oracle JDK 8 release. ... the family CLISD will be ignored and the latest JRE version...
Read more >
RHSA-2021:3889 - Security Advisory - Red Hat Customer Portal
A defensive security change in an earlier OpenJDK update led to a performance degradation when using the Scanner class.
Read more >
ndMail 1.8 Update Notes
The latest generally available (GA) version can always be ... the Folder Mapping version included with ndMail 1.8.0 (Folder Mapping version ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found