question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ways to speed up Wagtail installs

See original GitHub issue

Is your proposal related to a problem?

I just came out of a workshop where we had participant install Wagtail on Windows, and we noticed quite slow install times, up to 5-10 minutes for a participant. I suppose an element of this might just be slower machines, and @tomdyson let me know on Slack that it’s also important to use an up-to-date version of pip as older versions might not be able to use wheels. I wonder if there are other things we could do to speed up the install though, even if only by a few seconds.

Describe the solution you’d like

Inspecting a Wagtail install (on macOS),

Wheels

It looks like three of Wagtail’s dependencies don’t have prepublished wheels. Should we consider making PRs?

Building wheel for l18n (setup.py) ... done
Building wheel for django-treebeard (setup.py) ... done
Building wheel for draftjs-exporter (setup.py) ... done

For draftjs-exporter – I can easily publish as a wheel, not sure why it’s not set up yet (https://github.com/springload/draftjs_exporter/issues/132).

static_src

There is a line in our MANIFEST.in excluding a static_src folder – however it’s using a path that no longer exists since wagtail 2.0. Should we have all static_src folders there?

https://github.com/wagtail/wagtail/blob/e10a9f26e7c944fd3a037a0459d371ab122ff96d/MANIFEST.in#L3

global-exclude static_src

tests

We could also probably not publish our tests with Wagtail, hopefully just with:

global-exclude tests
global-exclude tests.py

Source maps

Wagtail only ships three source maps, but together those files account for about 4MB. I think I liked the idea of shipping these with Wagtail so users could report on JS errors that were intelligible, but in practice I haven’t seen this done that much since we started shipping those files.

2.1M	admin/static/wagtailadmin/js/draftail.js.map
1.1M	admin/static/wagtailadmin/js/vendor.js.map
440K	admin/static/wagtailadmin/js/wagtailadmin.js.map

To exclude these,

global-exclude *.map

Other files

Here are other patterns we should be able to exclude, resulting in small savings:

global-exclude .gitignore
# Single file but is quite big and does nothing at runtime.
global exclude wagtail-icomoon.json

(Describe your proposed solution here.)


Here is the change with all those modifications done:

# Before
29MB, 1742 directories, 2803 files
# After
19MB, 1647 directories, 2356 files

Not night-and-day, but worth considering. Is there anything I’ve missed? Anything from the list above that seems like a bad idea?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:20 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
PaarthAgarwalcommented, Mar 13, 2022

I’d like to work on this issue

1reaction
gasmancommented, Jun 17, 2020

There’s no licence problem with handsontable - that was a miscommunication. The non-OSS-compatible licence was introduced in version 7, so as long as we stick with 6.x I believe we’re fine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Performance — Wagtail Documentation 4.1.1 documentation
Install Redis through your package manager (on Debian or Ubuntu: sudo apt-get install ... This can drastically speed up page loads with many...
Read more >
Installation — wagtail-cache 2.2 documentation
1. Install¶ ... Add to installed apps in the project settings: INSTALLED_APPS = [ ... 'wagtailcache', ... ] ... Do not use the...
Read more >
Wagtail CMS: Using the save() method to remove template ...
In the previous lesson we discovered how to save sections of a template and reduce the number of queries on any given page...
Read more >
How to Install Wagtail on Ubuntu 18.04
Wagtail is excellent for creating blogs and other websites that let you present your ideas to the world through a fast and good-looking...
Read more >
Caching in Django With Redis
Personally, we like how easy it is to set up and use Redis for other purposes ... This is a tool that lets...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found