Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix series preview table height on the course page #4170

Merged
merged 8 commits into from
Nov 22, 2022

Conversation

jorg-vr
Copy link
Contributor

@jorg-vr jorg-vr commented Nov 17, 2022

This pull request is a third attempt to fix #3962. See #4167 and #4169 for previous attempts.

This pull request contains two parts:

  • A replacement of the old table preview. The new table preview has the correct height in all browser and also contains the activity name as requested by @niknetniko .
  • A speed up of the progress bar load, to offset reduced speed by the new table.

Analysis

To analyze the impact of these changes, I looked at two large courses. For fair comparison I disabled memcached and the sql query cache.

http://dodona.ugent.be/nl/courses/800/

102 series | 640 exercises | 488 users | 491.449 submissions

Pr Total request time Time in views Time in Activerecord Filesize
Old 755ms 620.0ms 125.4ms 833KB
#4167 2049ms 1780.3ms 228.3ms
#4169 6947ms 2827.0ms 4101.8ms
New 1049ms 838.6ms 200.3ms 990KB

http://dodona.ugent.be/nl/courses/359/

22 series | 90 exercises | 623 users | 355.789 submissions

Pr Total request time Time in views Time in Activerecord Filesize
Old 2006ms 394.3ms 1603.1ms 296 KB
#4167 1931ms 463.9ms 1456.2ms
#4169 1879ms 684.6ms 1182.8ms
New 970ms 352.4ms 607.9ms 326.3KB

Notes

The speed up is much less noticeable for the first course. This is due to the first two series of that course being exams in which few students participated.
In the second course the speedup is much greater then the slowdown, caused by loading the activity names.

In order to limit the increase in file size, I tried to keep the amount of html for each row to a minimum.

Visual

Old
image

New
image

Closes #3962 .

PS: this pr also containes some changes to the generated database file.
This is probably caused by me having a backup of production on my machine.
I would keep these changes in as they reflect the state of the production database.

@jorg-vr jorg-vr added the bug Something isn't working label Nov 17, 2022
@jorg-vr jorg-vr self-assigned this Nov 17, 2022
@jorg-vr jorg-vr marked this pull request as ready for review November 17, 2022 15:36
@jorg-vr jorg-vr requested a review from a team as a code owner November 17, 2022 15:36
@jorg-vr jorg-vr requested review from bmesuere and chvp and removed request for a team November 17, 2022 15:36
@bmesuere bmesuere added the deploy mestra Request a deployment on mestra label Nov 21, 2022
@bmesuere bmesuere temporarily deployed to mestra November 21, 2022 16:48 Inactive
@github-actions github-actions bot removed the deploy mestra Request a deployment on mestra label Nov 21, 2022
Copy link
Member

@bmesuere bmesuere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work with the index!

  • When I deploy this on mestra, the series don't seem to load when they scroll into view (no errors in console, no requests are made).
  • I'm not super fond of the difference in height for the skeleton bars. Is there a reason for that? The page grid looks nicer if they are all the same height heights (something in between the 2 heights that are used now)

@jorg-vr
Copy link
Contributor Author

jorg-vr commented Nov 22, 2022

@bmesuere

  1. Should be fixed now. Forgot to correctly set the SKELETON_TABLE_SELECTOR after testing
  2. I switched back to the old height. The height difference was to match the height of the elements in the actual table

@chvp chvp added the deploy mestra Request a deployment on mestra label Nov 22, 2022
@chvp chvp temporarily deployed to mestra November 22, 2022 08:34 Inactive
@github-actions github-actions bot removed the deploy mestra Request a deployment on mestra label Nov 22, 2022
app/models/submission.rb Show resolved Hide resolved
@bmesuere bmesuere added the deploy mestra Request a deployment on mestra label Nov 22, 2022
@bmesuere bmesuere temporarily deployed to mestra November 22, 2022 08:49 Inactive
@github-actions github-actions bot removed the deploy mestra Request a deployment on mestra label Nov 22, 2022
@jorg-vr jorg-vr merged commit 25fd270 into develop Nov 22, 2022
@jorg-vr jorg-vr deleted the fix/course-scrollspy branch November 22, 2022 09:43
@pdawyndt
Copy link
Contributor

pdawyndt commented Nov 26, 2022

Feels great to have this issue resolved. Thanks @jorg-vr!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Series navigation should always bring selected series to top of viewport
4 participants