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

Disable automatic reloading of assets in production #4138

Merged
merged 1 commit into from
Nov 29, 2016

Conversation

robertknight
Copy link
Member

In production builds, avoid stat-ing the manifest and bundle files on
each call to Environment.url since the assets never change until the
service is re-deployed.

See #4128 (comment)

FWIW I did some basic benchmarking of os.path.getmtime() locally. When all of the calls hit the stat cache, my system can manage ~1M calls/sec (native) or ~300K calls/sec (Docker container). On that basis I think it is quite unlikely that this would ever end up being a bottleneck, but adding a flag doesn't add much complexity either.

In production builds, avoid stat-ing the manifest and bundle files on
each call to Environment.url since the assets never change until the
service is re-deployed.
@codecov-io
Copy link

Current coverage is 83.45% (diff: 88.88%)

Merging #4138 into master will increase coverage by 0.02%

@@             master      #4138   diff @@
==========================================
  Files           158        158          
  Lines          6183       6197    +14   
  Methods           0          0          
  Messages          0          0          
  Branches        701        705     +4   
==========================================
+ Hits           5159       5172    +13   
+ Misses          949        948     -1   
- Partials         75         77     +2   

Powered by Codecov. Last update 813f838...54f9bef

@seanh seanh merged commit e92db6c into master Nov 29, 2016
@seanh seanh deleted the no-auto-reload-in-prod branch November 29, 2016 17:40
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

Successfully merging this pull request may close these issues.

3 participants