-
Notifications
You must be signed in to change notification settings - Fork 630
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
std/encoding/csv.ts - parse
and stringify
should not require async code when data is already in memory
#880
Comments
All async code requirement seems to come from this single line: And from the function signature, it seems both Not sure why we actually support YAML/TOML (and native JSON) libs only support strings as input so it would actually be more consistent
|
I want to pick up this issue. It seems like I only have the remove the |
Anyone else can try if they want. |
(Sorry for the late reply, but) I think async parse (with BufReader) might make sense if the source csv file is very big. That should reduce the memory usage and execution time. |
I could take a look on that too, I'm already on the works of another issue envolving the same file. I'm just not sure if this is already solved. |
@kt3k This issue should probably be closed. Sanity check: https://deno.land/std@0.168.0/encoding/csv.ts?doc=&s=parse |
@lino-levan Thanks for the ping. Right, both are now sync. This issue should be now closed. refs:
|
Right now, the code in https://github.com/denoland/deno/blob/std/0.82.0/std/encoding/csv.ts forces the caller of
parse
andstringify
to await the result, but there is no reason for these functions to be async when the object is already in memory.The text was updated successfully, but these errors were encountered: