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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 115
Download (untitled) / with headers
text/plain 115b
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.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-6562-1192284197-1160.29607-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 560
Download (untitled) / with headers
text/plain 560b
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.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-4108-1241451882-1480.29607-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 169
Download (untitled) / with headers
text/plain 169b
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.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.