intrigeri: > Niels Thykier wrote (05 Jul 2016 20:21:03 GMT) : >> Re: the memory usage; it may make sense to do the report as multiple >> "documents" (e.g. one per source package or something). > >> It would allow both generator and consumers to process it more >> efficiently by processing a single source at the time. >
Hi, I think we might be talking part each other. YAML has a concept called a "document" and you can have multiple documents per file[ยก]. What I wanted was multiple documents in a single file, which means ... > [...] > > First of all, for my use case retrieving all data in one single HTTP > request simpler, [...] > There would only be one HTTP request. > Also, once published on https://lintian.d.o/, these per-package files > will look very much like endpoints for a web API, that consumers might > start using in the wild, and then: > There would only be one endpoint. The consumer would just have to "iterate" over all documents in the file. It would not be much different than have the "outer most" data structure being a list. But as each document is "self-contained", they do not have to load the entire file into memory to process it (depending on their use case). Thanks, ~Niels [1] http://yaml.org/spec/1.0/#id2561718