[WIP] Implementing lazy load feature for review request
Review Request #11433 — Created Feb. 5, 2021 and updated
ReviewBoard currently renders all historic data for review request,
and the data ends up getting computed and loaded on the client, which
makes things seem slow. In order to enhance performance, we would like
to implement a lazy-load feature where collapsed review entries get sent
to the client empty, and then fetch the content dynamically when and if
the entry is expanded.
When we inspect elements on the browser, any entry boxes that is collapsed
will not render the body tag (the body tag will be empty).
Summary | ID |
---|---|
8caa5459798cb675024431c4f053f24d50607178 | |
70e11185887defc3fb79eca88a8b380f214b5dcb |
Description | From | Last Updated |
---|---|---|
There's a bunch of stuff in your change that probably got pulled in during some merges. Please make sure that … |
david | |
I don't think these are changes we want to make, especially in the base class. |
david | |
For now, we should keep our changes only for reviews. Let's do this within the entry_content block in reviewboard/templates/reviews/entries/review.html |
david |
- Change Summary:
-
The function renderContents does not assume that some HTML tags would be present/generated for each entries. So the tags that specify the entry contents need to be "halted" until the box is expanded. So we pulled up a new function that works with those tags and called this function only when the box is expanded.
- Commits:
-
Summary ID c0c0e3c4571a035e66612238c209f5f922318ec2 8caa5459798cb675024431c4f053f24d50607178 - Branch:
-
implement_lazy_loadmaster
- Diff:
-
Revision 2 (+76 -20)
Checks run (2 succeeded)
- Change Summary:
-
Added logic/condition in base.html file that makes sure the body element of any entry box will be rendered when the box is not collapsed.
- Testing Done:
-
+ When we inspect elements on the browser, any entry boxes that is collapsed
+ will not render the body tag (the body tag will be empty). - Commits:
-
Summary ID 8caa5459798cb675024431c4f053f24d50607178 8caa5459798cb675024431c4f053f24d50607178 70e11185887defc3fb79eca88a8b380f214b5dcb