Skip to content

Improve load times on script edit page#10730

Closed
balderdash wants to merge 2 commits into
stagingfrom
levelbuilder-speed
Closed

Improve load times on script edit page#10730
balderdash wants to merge 2 commits into
stagingfrom
levelbuilder-speed

Conversation

@balderdash

@balderdash balderdash commented Sep 19, 2016

Copy link
Copy Markdown
Contributor

Two easy improvements:

  • link_to is slower than writing your own anchor tags (according to http://stackoverflow.com/a/5684467, link_to tries to find the shortest url by examining available routes). Changing the level lists to use %a instead of link_to improved loading time (on my machine, for /s/grade3/edit) from ~15s to ~8s.
  • Added a select clause to the queries used to generate those level lists to only grab id and name. That further reduced load times from ~8s to ~3.5s.

@joshlory

Copy link
Copy Markdown
Contributor

I wonder if we can kill the list of levels entirely on this page? Maybe worth a quick question to level builders of whether or not they even use this list. Otherwise LGTM!

@balderdash

Copy link
Copy Markdown
Contributor Author

Closing in favor of #10748

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