Skip to content

apply minor enebo's comments#1809

Merged
enebo merged 1 commit intojruby:masterfrom
ratnikov:loadservice-enebo-comments
Jul 16, 2014
Merged

apply minor enebo's comments#1809
enebo merged 1 commit intojruby:masterfrom
ratnikov:loadservice-enebo-comments

Conversation

@ratnikov
Copy link
Contributor

Changes:

  1. Use new File(...).isAbsolute to detect whether path is absolute, rather than using a custom [probably faulty] regex.
  2. Kill unnecessary if on null.

Concerning returning buffered stream to optimize file loads. I have looked into it, but behavior on my SSD seems pretty identical, whether to wrap BuffereInputStream with 8096 buffer or not. To test I've added a system properties to switch between the two strategies and used rails 4 and following command:

bin/jruby -e 'require "benchmark"; puts Benchmark.measure { require "rails/all" }'

Whether I turn buffering or not, the result is usually around 25seconds CPU time (sometimes bumping up to 34 for either case). But maybe that's because seek time is not a factor for SSDs, so I will try it on a regular hard drive on Monday.

@enebo enebo added this to the JRuby 1.7.14 milestone Jul 16, 2014
enebo added a commit that referenced this pull request Jul 16, 2014
@enebo enebo merged commit cff0f68 into jruby:master Jul 16, 2014
@enebo enebo modified the milestones: JRuby 1.7.14, JRuby 1.7.15 Aug 27, 2014
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.

2 participants