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

use XString instead of B::perlstring #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

atoomic
Copy link

@atoomic atoomic commented Aug 13, 2019

Note that this is also avoiding an implicit
load of B coming from Specio.

Note that this is also avoiding an implicit
load of B coming from Specio.
@tobyink
Copy link
Owner

tobyink commented Aug 29, 2019

B is a core module. XString would introduce an additional dependency.

What would be the advantage of this?

@atoomic
Copy link
Author

atoomic commented Aug 29, 2019

The main advantage is memory saving as you do not need all utils from B
XString provides that single helper and avoid the bloat

@tobyink
Copy link
Owner

tobyink commented Sep 4, 2019

$ perl -MTypes::DateTime -E'say for sort keys %INC' | wc -l
126

B.pm accounts for about 2k of memory out of the roughly 50k of modules that Types::DateTime loads. It introduces an additional dependency for a 4% memory saving at best.

(And if your project also loads B.pm via some other dependency, you'll get both loaded, and it will actually cost you more memory.)

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.

None yet

2 participants