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

Performance of uncached local builds of the site #8305

Closed
don-code opened this issue Sep 17, 2019 · 10 comments
Closed

Performance of uncached local builds of the site #8305

don-code opened this issue Sep 17, 2019 · 10 comments

Comments

@don-code
Copy link
Contributor

Building the DevOpsDays site on my laptop, when plugged in, kicks up the fan and takes over five minutes:

                   |  EN   
+------------------+------+
  Pages            | 7228  
  Paginator pages  |    2  
  Non-page files   |   74  
  Static files     | 8592  
  Processed images |    0  
  Aliases          |  489  
  Sitemaps         |    1  
  Cleaned          |    0  

Total in 311477 ms

Today I built it on a train ride, for which I kept the laptop in power save mode to conserve battery, which took 24 minutes:

                   |  EN   
+------------------+------+
  Pages            | 7228  
  Paginator pages  |    2  
  Non-page files   |   74  
  Static files     | 8592  
  Processed images |    0  
  Aliases          |  489  
  Sitemaps         |    1  
  Cleaned          |    0  

Total in 1441323 ms

By removing events from 2018 and prior, the five minutes becomes just north of one:

                   |  EN   
+------------------+------+
  Pages            | 2903  
  Paginator pages  |    2  
  Non-page files   |   38  
  Static files     | 8592  
  Processed images |    0  
  Aliases          |  216  
  Sitemaps         |    1  
  Cleaned          |    0  

Total in 76134 ms

That said, one possible solution would be to prerender old events which would no longer change, and serve them as static assets rather than dynamically-generated content. Is there any interest in that solution? I'd be happy to build a tool that does it, and PR in the result of running it for 2018 and prior.

@bridgetkromhout
Copy link
Collaborator

one possible solution would be to prerender old events which would no longer change, and serve them as static assets rather than dynamically-generated content.

This is something @mattstratton has done periodically in the past, and it's likely time to do it again.

@mattstratton
Copy link
Member

The being said, if @don-code wants to write a script or tooling to automate it I’m good with that too :)

@mattstratton
Copy link
Member

You can’t remove the data files for old events btw because the /events page uses them to build the list of past events :)

@mattstratton
Copy link
Member

Here’s an example of an event that has been moved to static

https://github.com/devopsdays/devopsdays-web/tree/master/static/events/2016-chicago

@bridgetkromhout
Copy link
Collaborator

Here's a PR to archive 2017 and some of 2018 (the ones that have run again in 2019): #8332

@bridgetkromhout
Copy link
Collaborator

Hi, @don-code - I think you'll find that your build times are significantly improved if you rebase from upstream master. Thanks.

@don-code
Copy link
Contributor Author

Thank you for #8332! Our event is coming up in four days, so I'll likely action this issue with some automation for future years once I get some time back afterwards.

@bridgetkromhout
Copy link
Collaborator

I additionally archived late 2018 in #8983.

This is a pretty trivial process, but in doing so, we've noticed that we could improve the process to ensure we don't end up with broken links from updated sponsors and missing links to newer events: #8983 (comment)

@bridgetkromhout
Copy link
Collaborator

Is there additional work in the scope of performance improvements, @mattstratton? If not, I suspect this issue is as solved as it's going to get.

@mattstratton
Copy link
Member

Given that we are tracking overall performance things in #7949, I think we can close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants