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

Avoid slow file output with JRuby/Windows #16

Merged
merged 2 commits into from
Jul 10, 2014
Merged

Avoid slow file output with JRuby/Windows #16

merged 2 commits into from
Jul 10, 2014

Conversation

pschambacher
Copy link
Contributor

Replace w+ mode with wb+ mode since it does not replace \n with \r\n, which seems to be really time consuming on big outputs.

JRuby on windows tries to replace all \n with \r\n and does it so poorly that it takes forever to generate the file.
To avoid any kind of interpretation, set the writing mode to wb+ (B meaning binary).
Extract the fix from previous commit into a function.
Only patch for JRuby/Windows. Maybe MRI/Windows is also affected but we would need more input for that.
@takaokouji
Copy link

👍

@xaviershay
Copy link
Collaborator

Recommend merging this. It's old, but still seems relevant.

Would be preferable to have a benchmark, but from the original ticket and described context I don't think that should block this.

@bf4
Copy link
Collaborator

bf4 commented Jul 9, 2014

@xaviershay would you like to be a maintainer/collaborator?

@xaviershay
Copy link
Collaborator

don't have the bandwidth for a full maintainer role, but happy to triage tickets every now and then as a collab :)

@bf4
Copy link
Collaborator

bf4 commented Jul 10, 2014

which you are clearly already doing :)

bf4 added a commit that referenced this pull request Jul 10, 2014
Avoid slow file output with JRuby/Windows
@bf4 bf4 merged commit 903c37b into simplecov-ruby:master Jul 10, 2014
@bf4
Copy link
Collaborator

bf4 commented Jul 10, 2014

Closes simplecov-ruby/simplecov#191

@xaviershay
Copy link
Collaborator

haha, yeah it's easier if I can just do the thing I'm recommending though!

@bf4
Copy link
Collaborator

bf4 commented Jul 10, 2014

Hey, @colszowka, please to add @xaviershay as collab!!!

jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Mar 14, 2015
## Bugfixes

0.9.2, 2015-02-18 ([changes](simplecov-ruby/simplecov@v0.9.1...v0.9.2))
====================

This is a minor bugfix release for simplecov-html, released as `0.9.0`. Due to the tight version constraint in the gemspec
a new release of simplecov had to be shipped to allow using simplecov-html `~> 0.9.0`.

  * The browser back / forward button should now work again. See [#36](simplecov-ruby/simplecov-html#36) and
    [#35](simplecov-ruby/simplecov-html#35). Thanks @whatasunnyday and @justinsteele for submitting PRs to fix this.
  * Fix "warning: possibly useless use of a variable in void context" See [#31](simplecov-ruby/simplecov-html#31). Thanks @cbandy
  * Always use binary file format. See [#32](simplecov-ruby/simplecov-html#32). Thanks @andy128k
  * Avoid slow file output with JRuby/Windows. See [#16](simplecov-ruby/simplecov-html#16). Thanks @pschambacher

Other than the release includes a bunch of mostly documentation improvements:

  * Update Rails path for Rails 4+. See [#336](simplecov-ruby/simplecov#336). Thanks @yazinsai
  * Encourage use of .simplecov to avoid lost files. See [#338](simplecov-ruby/simplecov#338). thanks @dankohn
  * Specified in the gemspec that simplecov needs ruby 1.8.7. See [#343](simplecov-ruby/simplecov#343). thanks @iainbeeston
  * Fix mispointed link in CHANGELOG.md. See [#353](simplecov-ruby/simplecov#353). Thanks @dleve123
  * Improve command name docs. See [#356](simplecov-ruby/simplecov#356). Thanks @gtd
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.

4 participants