Shawn Walker wrote: > Currently, the serialized result is never stored in-memory to keep > the memory footprint smaller.
Ah, okay. Given its size, that makes sense. > However, I could probably cheat and give json.dump() a sub-classed > file objects and intercept the writes as they happen to find the > offset and then pass the data onto the real file object for writing. > > Then, when the file is close()'d I could go back and replace the > signature as you've suggested. > > Too hacky? I dunno; it's certainly getting there. See what the performance difference is between that and just searching for it once it's on disk and the in-attrs version (or not signing; I assume that one's speedy enough to be equivalent to nothing), and how you feel the code is looking, and make the decision based on that. I think I'd be comfortable with the subclassed file objects, but I could see how others might not be. :) Danek _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
