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

question about in memory accumulation #15

Open
richardwan opened this issue Mar 26, 2022 · 1 comment
Open

question about in memory accumulation #15

richardwan opened this issue Mar 26, 2022 · 1 comment

Comments

@richardwan
Copy link

richardwan commented Mar 26, 2022

I have a question (but do not know if the issues are the appropriate place for this). if not passed a block but "lazy" is called, will the objects still accumulate in memory? for example, will objects still accmulate in memory when invoked like this?

        File.open(path, 'r') do |f|
          Json::Streamer.parser(file_io: f).get(nesting_level: 1).lazy
        end

if this does not have the desired effect, will wrapping things in Enumerator::Lazy.new help?

@thisismydesign
Copy link
Owner

Hey @richardwan, I'm not sure but there's a spec for memory usage, you can play around with that.

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

No branches or pull requests

2 participants