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

how to parse a large file #267

Open
happydpc opened this issue Oct 29, 2019 · 4 comments
Open

how to parse a large file #267

happydpc opened this issue Oct 29, 2019 · 4 comments

Comments

@happydpc
Copy link

I want to parse a large file to 2G. I wonder if there exists a multithread way to acclerate the parsing work.

@Marwes
Copy link
Owner

Marwes commented Oct 29, 2019

There isn't anything builtin to combine that would let you parallelize the work. You will need to chunk up the file on your own to get that. Of course, you should profile first to see that parallelizing could be useful.

Depending on the format, monoidal parsing could be used to parallelize your parser (though it is pretty limited).

@happydpc
Copy link
Author

Dose the asyn method can be used to build dependency relations? Monoidal parsing any example on rust, I search out some Haskell version. Thank you for your help.

@Marwes
Copy link
Owner

Marwes commented Oct 29, 2019

Dose the asyn method can be used to build dependency relations?

What do you mean?

Monoidal parsing any example on rust, I search out some Haskell version. Thank you for your help.

Afraid not, I only know of Haskell examples. If you know enough Haskell to understand it, they should be easy to port to rust, otherwise I wouldn't go with that approach.

@happydpc
Copy link
Author

Ok, thank you. I will try to optimize it first.

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