commit | 5a0d8beaeb747337fa44d6454c6c42131976b6b2 | [log] [tgz] |
---|---|---|
author | Ben Rohlfs <brohlfs@google.com> | Wed May 18 10:46:19 2022 +0200 |
committer | Ben Rohlfs <brohlfs@google.com> | Fri May 20 14:39:59 2022 +0200 |
tree | c6f57b84e92eb9faf31a80c9b576cdab3f54608d | |
parent | ab4c24db99dce640d880737f55ca7f770786aa14 [diff] |
Fix events emitted by gr-diff-builder-element We had multiple issues with render-* events. Change 334544 has added a 'render-progress' event for updating cursor stops while the rendering is still in progress. This has now been identified as substantially impacting rendering performance. Such events were fired hundreds of times per second (one for each diff group). Updating cursor stops involves querying the DOM, which forces the browser to reflow. This should be avoided, so we are removing 'render-progress' events altogether in this change. Maybe a solution for updating cursor stops is using a timer that fires every 500 ms or so. But that needs some careful thought and has to be done in a separate change. Change 336092 tried to fire 'render-*' events only after DOM rendering has completed, but it did not work as intended, and change 336494 tried to fix that. But it turns out that `afterNextRender` uses `requestAnimationFrame`, which is not invoking callbacks while tabs are in the background. This broke Gerrit's latency metrics and triggered SLO alerts, see b/232095724. We are replacing usages of `afterNextRender` by `whenRendered`, which is using a `ResizeObserver` and waits for the DOM element to get a clientHeight > 0. Google-Bug-Id: b/232095724 Release-Notes: skip Change-Id: I98d99ca43bf12ba901bb2defe8a4ded3bf0f587c
Gerrit is a code review and project management tool for Git based projects.
Gerrit makes reviews easier by showing changes in a side-by-side display, and allowing inline comments to be added by any reviewer.
Gerrit simplifies Git based project maintainership by permitting any authorized user to submit changes to the master Git repository, rather than requiring all approved changes to be merged in by hand by the project maintainer.
For information about how to install and use Gerrit, refer to the documentation.
Our canonical Git repository is located on googlesource.com. There is a mirror of the repository on Github.
Please report bugs on the issue tracker.
Gerrit is the work of hundreds of contributors. We appreciate your help!
Please read the contribution guidelines.
Note that we do not accept Pull Requests via the Github mirror.
The Developer Mailing list is repo-discuss on Google Groups.
Gerrit is provided under the Apache License 2.0.
Install Bazel and run the following:
git clone --recurse-submodules https://gerrit.googlesource.com/gerrit cd gerrit && bazel build release
The instruction how to configure GerritForge/BinTray repositories is here
On Debian/Ubuntu run:
apt-get update && apt-get install gerrit=<version>-<release>
NOTE: release is a counter that starts with 1 and indicates the number of packages that have been released with the same version of the software.
On CentOS/RedHat run:
yum clean all && yum install gerrit-<version>[-<release>]
On Fedora run:
dnf clean all && dnf install gerrit-<version>[-<release>]
Docker images of Gerrit are available on DockerHub
To run a CentOS 8 based Gerrit image:
docker run -p 8080:8080 gerritcodereview/gerrit[:version]-centos8
To run a Ubuntu 20.04 based Gerrit image:
docker run -p 8080:8080 gerritcodereview/gerrit[:version]-ubuntu20
NOTE: release is optional. Last released package of the version is installed if the release number is omitted.