[WIP] Implementing lazy load feature for review request
Review Request #11433 — Created Feb. 5, 2021 and updated
Information | |
---|---|
clarissaudrey | |
Review Board | |
master | |
Reviewers | |
reviewboard, students | |
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 |
---|
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 … |
|
|
I don't think these are changes we want to make, especially in the base class. |
|
|
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 |
|
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: |
|
||||||
---|---|---|---|---|---|---|---|
Branch: |
|
||||||
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: |
|
||||||||
---|---|---|---|---|---|---|---|---|---|
Commits: |
|
||||||||
Diff: |
Revision 3 (+65 -39) |
Checks run (2 succeeded)
-
-
reviewboard/__init__.py (Diff revision 3) There's a bunch of stuff in your change that probably got pulled in during some merges. Please make sure that you revert them.
-
reviewboard/static/rb/js/reviewRequestPage/views/baseStatusUpdatesEntryView.es6.js (Diff revision 3) I don't think these are changes we want to make, especially in the base class.
-
reviewboard/templates/reviews/entries/base.html (Diff revision 3) For now, we should keep our changes only for reviews. Let's do this within the
entry_content
block inreviewboard/templates/reviews/entries/review.html