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 require memory leak with pathnames in load path #449

Merged
merged 1 commit into from Jan 30, 2018

Conversation

Projects
None yet
2 participants
@jrafanie
Contributor

jrafanie commented Jan 26, 2018

Any ruby requires that occur in your application will leak with
Pathnames in the $LOAD_PATH in ruby 2.3/2.4. Beyond that, it's faster
to use strings in the load path. Please join this bug and add your
support for a fix:

https://bugs.ruby-lang.org/issues/14372

Avoid require memory leak with pathnames in load path
Any ruby requires that occur in your application will leak with
Pathnames in the $LOAD_PATH in ruby 2.3/2.4.  Beyond that, it's faster
to use strings in the load path.  Please join this bug and add your
support for a fix:

https://bugs.ruby-lang.org/issues/14372
@jrafanie

This comment has been minimized.

Show comment
Hide comment
@jrafanie

jrafanie Jan 26, 2018

Contributor

screencast 2018-01-26 11-35-31

Contributor

jrafanie commented Jan 26, 2018

screencast 2018-01-26 11-35-31

jrafanie added a commit to jrafanie/openproject that referenced this pull request Jan 26, 2018

Avoid require memory leak with pathnames in load path
Any ruby requires that occur in your application will leak with
Pathnames in the $LOAD_PATH in ruby 2.3/2.4. Beyond that, it's faster
to use strings in the load path. Please join this bug and add your
support for a fix:

https://bugs.ruby-lang.org/issues/14372

Same problem found here: lobsters/lobsters#449

jrafanie added a commit to jrafanie/errbit that referenced this pull request Jan 26, 2018

Avoid require memory leak with pathnames in load path
Any ruby requires that occur in your application will leak with
Pathnames in the $LOAD_PATH in ruby 2.3/2.4. Beyond that, it's faster
to use strings in the load path. Please join this bug and add your
support for a fix:

https://bugs.ruby-lang.org/issues/14372

Same problem found here: lobsters/lobsters#449
and
opf/openproject#6148

jrafanie added a commit to jrafanie/errbit that referenced this pull request Jan 26, 2018

Avoid require memory leak with pathnames in load path
Any ruby requires that occur in your application will leak with
Pathnames in the $LOAD_PATH in ruby 2.3/2.4. Beyond that, it's faster
to use strings in the load path. Please join this bug and add your
support for a fix:

https://bugs.ruby-lang.org/issues/14372

Same problem found here: lobsters/lobsters#449
and
opf/openproject#6148

oliverguenther added a commit to opf/openproject that referenced this pull request Jan 28, 2018

Avoid require memory leak with pathnames in load path (#6148)
Any ruby requires that occur in your application will leak with
Pathnames in the $LOAD_PATH in ruby 2.3/2.4. Beyond that, it's faster
to use strings in the load path. Please join this bug and add your
support for a fix:

https://bugs.ruby-lang.org/issues/14372

Same problem found here: lobsters/lobsters#449

[ci skip]

oliverguenther added a commit to opf/openproject that referenced this pull request Jan 29, 2018

Avoid require memory leak with pathnames in load path
Any ruby requires that occur in your application will leak with
Pathnames in the $LOAD_PATH in ruby 2.3/2.4. Beyond that, it's faster
to use strings in the load path. Please join this bug and add your
support for a fix:

https://bugs.ruby-lang.org/issues/14372

Same problem found here: lobsters/lobsters#449

@pushcx pushcx merged commit 14a8b03 into lobsters:master Jan 30, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@pushcx

This comment has been minimized.

Show comment
Hide comment
@pushcx

pushcx Jan 30, 2018

Member

Thanks for this small workaround. I'd just bump to Ruby 2.5, but Ubuntu doesn't yet have a package for the LTS we're on (xenial).

Member

pushcx commented Jan 30, 2018

Thanks for this small workaround. I'd just bump to Ruby 2.5, but Ubuntu doesn't yet have a package for the LTS we're on (xenial).

@jrafanie jrafanie deleted the jrafanie:avoid_memory_leak_with_require_and_pathnames_in_load_path branch Jan 30, 2018

@jrafanie

This comment has been minimized.

Show comment
Hide comment
@jrafanie

jrafanie Jan 30, 2018

Contributor

@pushcx Good point. Honestly though, there are optimizations/caching done for string $LOAD_PATH objects that aren't done for pathname so even on 2.5.0, it's faster to use strings in the load path.

Contributor

jrafanie commented Jan 30, 2018

@pushcx Good point. Honestly though, there are optimizations/caching done for string $LOAD_PATH objects that aren't done for pathname so even on 2.5.0, it's faster to use strings in the load path.

@pushcx

This comment has been minimized.

Show comment
Hide comment
@pushcx

pushcx Jan 30, 2018

Member

Oh, cool. Thank you for pointing that out, I'm happy to have a little perf improvement.

Member

pushcx commented Jan 30, 2018

Oh, cool. Thank you for pointing that out, I'm happy to have a little perf improvement.

stevecrozz added a commit to errbit/errbit that referenced this pull request Feb 13, 2018

Avoid require memory leak with pathnames in load path (#1257)
Any ruby requires that occur in your application will leak with
Pathnames in the $LOAD_PATH in ruby 2.3/2.4. Beyond that, it's faster
to use strings in the load path. Please join this bug and add your
support for a fix:

https://bugs.ruby-lang.org/issues/14372

Same problem found here: lobsters/lobsters#449
and
opf/openproject#6148
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment