k6-docs icon indicating copy to clipboard operation
k6-docs copied to clipboard

More visibility to the example reading a CSV file in small chunks

Open ppcano opened this issue 1 year ago • 2 comments

Reading large files can lead to OOM errors, which is a common problem with open() (here a minor related PR) .

The example using the new Stream API provides a solution for this.

Wondering how we could better connect this example with other parts of the docs or additional tutorials.

ppcano avatar Jul 12 '24 17:07 ppcano

cc @heitortsergent and @joanlopez who wrote the file.read and ReadableStream example

ppcano avatar Jul 15 '24 08:07 ppcano

Yeah! I always thought that we have very good material within the "Examples" section, but unfortunately its visibility is not very good (imho). So, I guess we could explore things like:

  • (Now, and from time to time), do a pass over all the examples and find all the places they could be linked to. For instance, the "HTTP Authentication" example could be linked from the HTTP module docs.
  • Try to find another, better place for such kind of useful resources. Like we have "Recommended practices" specifically for the Browser section. Perhaps a "Troubleshooting" section, where one of the topics is memory management?

Beyond that, it would also be very good to have better discoverability through the Search functionality, but afaik that's under discussion right now.

joanlopez avatar Jul 15 '24 09:07 joanlopez