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

Trim prerenders #1574

Merged
merged 2 commits into from
Jul 28, 2022
Merged

Trim prerenders #1574

merged 2 commits into from
Jul 28, 2022

Conversation

damianhxy
Copy link
Member

Description

  • Remove prerender for version links
  • Remove prerender for previous student

Motivation and Context

In #1415 and #1503, prerender was used with the goal of loading likely pages in advance to reduce loading times.

However, through testing, it turns out that only one link (previous student) was prerendered (actually NoState Prefetch). Given that TAs are most likely to go to the next student, this PR removes all prerenders except for the link to the next student.

How Has This Been Tested?

  1. Use Chrome incognito
  2. Start logging with chrome://net-export/
  3. Load a page with prev / next version / student available and wait for a few seconds
  4. Stop logging
  5. Import log file to netlog viewer

Before changes: Only previous student prerendered (1908). Previous version (1906), next version (1910), next student (1895) links encounter a Rate Limit Exceeded.

Screen Shot 2022-07-29 at 00 29 35

After changes: Next student prerendered (1895).

Screen Shot 2022-07-29 at 01 01 59

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have run rubocop for style check. If you haven't, run overcommit --install && overcommit --sign to use pre-commit hook for linting
  • My change requires a change to the documentation, which is located at Autolab Docs
  • I have updated the documentation accordingly, included in this PR

Copy link
Contributor

@victorhuangwq victorhuangwq left a comment

Choose a reason for hiding this comment

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

I have only one comment. But in general it seems to be as intended

app/views/submissions/_version_links.html.erb Show resolved Hide resolved
@damianhxy damianhxy merged commit fc8369f into master Jul 28, 2022
@damianhxy damianhxy deleted the trim-prerender branch July 28, 2022 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants