Skip Menu |

This queue is for tickets about the JSON-Any CPAN distribution.

Report information
The Basics
Id: 29607
Status: rejected
Priority: 0/
Queue: JSON-Any

People
Owner: Nobody in particular
Requestors: colossus.forbin [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: allow JSON input as scalar ref
for a large blob of JSON, it would probably be more efficient to pass it in as a scalar ref than having to copy it.
On Tue Sep 25 14:52:00 2007, forbin wrote: Show quoted text
> for a large blob of JSON, it would probably be more efficient to pass it > in as a scalar ref than having to copy it.
it would still have to be copied when the underlying JSON module gets it, so this like a micro optimization to me. Is it benchmarkable? Compared to the number of allocations done to inflate that memory, and the fact that perl's data structure probably have a 10x overhead, saving one allocation + memcpy even for something like a 1mb json document seems like it won't make a real difference.
No further comments or progress on this has been made, and ultimately it would be a task for one of the underlying modules to support and JSON::Any to *possibly* expose.