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 sucker! -> Get performance doubled! #503
Comments
Send me a PR? |
Ok, a little later, currently busy investigating another, maybe related issue |
Also strings can start with |
yes, i am looking for |
Note to self: Try with this: require 'rbconfig'
@platform = case RbConfig::CONFIG['host_os']
when /darwin/
OSX
when /win/
WINDOWS
end` thanks to @fkchang |
I'm saying that while doing the check we have to check for a colon in both index Also we can use a straight equal |
We generally use sprockets/lib/sprockets/path_utils.rb Line 76 in 341fed4
|
Oh, yes, before i had if path[7..9].include?(':') thats where the include came from, then i thought [7..8] is not legal and changed it to [9] |
Great, then File::ALT_SEPARATOR it shall be |
hi, the comment is misleading. 'path' variable contains already parsed uri, so it actualy looks like this # Hack for parsing Windows "/C:/Users/IEUser" paths
if File::ALT_SEPARATOR
path = path[1..-1]
end |
patches and numbers |
Here are numbers, effects per patch vs. stock 3.7.1 for a large set of assets like in opal-rails/ruby-hyperloop on my machine, large rails app, time taken for a javascript_include_tag, development environment, ruby-2.4.2, macOS, assets.debug = true, FileStore, best out of 10: without compile
conclusionregexp patch and cache size patch are most effective, performance doubled opal recompiling an *.rb
conclusionregexp patch and cache size patch are most effective, performance doubled |
without compile
opal recompiling an *.rb
|
*_proper containing only the cache adjustment and regexp patch |
closing, got a opal-webpack-loader instead |
sprockets-3.7.1/lib/sprockets/uri_utils.rb
in
def split_file_uri(uri)
Line 51
is a performance sucker. Replacing it with this:
DOUBLES performance for me, that is in
javascript_include_tag 'applications.js'
, generating the <script> tag, time going down from 3 seconds to 1.5 seconds, in rails, development environment, with opal-rails and ruby-hyperloop.org.The text was updated successfully, but these errors were encountered: