+Fri Nov 12 10:52:19 IST 2010 Abhijit Menon-Sen <ams@toroid.org>
+
+ Version 2.24
+
+ Performance improvement for overloaded classes from Benjamin
+ Holzman.
+
+Fri Nov 12 10:36:22 IST 2010 Abhijit Menon-Sen <ams@toroid.org>
+
+ Version 2.23
+
+ Release the latest version from the Perl repository.
+
Thu Aug 6 10:55:50 IST 2009 Abhijit Menon-Sen <ams@toroid.org>
Version 2.21
Jarkko Hietaniemi <jhi@iki.fi>
Ulrich Pfeifer <pfeifer@charly.informatik.uni-dortmund.de>
- Benjamin A. Holzman <bah@ecnvantage.com>
+ Benjamin A. Holzman <bholzman@earthlink.net>
Andrew Ford <A.Ford@ford-mason.co.uk>
Gisle Aas <gisle@aas.no>
Jeff Gresham <gresham_jeffrey@jpmorgan.com>
use FileHandle;
use vars qw($canonical $forgive_me $VERSION);
-$VERSION = '2.23';
+$VERSION = '2.24';
*AUTOLOAD = \&AutoLoader::AUTOLOAD; # Grrr...
#
Jarkko Hietaniemi <jhi@iki.fi>
Ulrich Pfeifer <pfeifer@charly.informatik.uni-dortmund.de>
- Benjamin A. Holzman <bah@ecnvantage.com>
+ Benjamin A. Holzman <bholzman@earthlink.net>
Andrew Ford <A.Ford@ford-mason.co.uk>
Gisle Aas <gisle@aas.no>
Jeff Gresham <gresham_jeffrey@jpmorgan.com>
Salvador Ortiz Garcia <sog@msg.com.mx>
Dominic Dunlop <domo@computer.org>
Erik Haugan <erik@solbors.no>
+ Benjamin A. Holzman <ben.holzman@grantstreet.com>
for their bug reports, suggestions and contributions.
a binary incompatibility for the Storable image starting at version
0.6--older images are, of course, still properly understood).
Murray Nesbitt made Storable thread-safe. Marc Lehmann added overloading
-and references to tied items support.
+and references to tied items support. Benjamin Holzman added a performance
+improvement for overloaded classes; thanks to Grant Street Group for footing
+the bill.
=head1 AUTHOR
SV *(**retrieve_vtbl)(pTHX_ struct stcxt *, const char *); /* retrieve dispatch table */
SV *prev; /* contexts chained backwards in real recursion */
SV *my_sv; /* the blessed scalar who's SvPVX() I am */
+ int in_retrieve_overloaded; /* performance hack for retrieving overloaded objects */
} stcxt_t;
#define NEW_STORABLE_CXT_OBJ(cxt) \
/*
* Bless `s' in `p', via a temporary reference, required by sv_bless().
+ * "A" magic is added before the sv_bless for overloaded classes, this avoids
+ * an expensive call to S_reset_amagic in sv_bless.
*/
#define BLESS(s,p) \
STMT_START { \
TRACEME(("blessing 0x%"UVxf" in %s", PTR2UV(s), (p))); \
stash = gv_stashpv((p), GV_ADD); \
ref = newRV_noinc(s); \
+ if (cxt->in_retrieve_overloaded && Gv_AMG(stash)) \
+ { \
+ cxt->in_retrieve_overloaded = 0; \
+ SvAMAGIC_on(ref); \
+ } \
(void) sv_bless(ref, stash); \
SvRV_set(ref, NULL); \
SvREFCNT_dec(ref); \
cxt->use_bytes = -1; /* Fetched from perl if needed */
#endif
cxt->accept_future_minor = -1; /* Fetched from perl if needed */
+ cxt->in_retrieve_overloaded = 0;
}
/*
#endif
cxt->accept_future_minor = -1; /* Fetched from perl if needed */
+ cxt->in_retrieve_overloaded = 0;
reset_context(cxt);
}
rv = NEWSV(10002, 0);
SEEN(rv, cname, 0); /* Will return if rv is null */
+ cxt->in_retrieve_overloaded = 1; /* so sv_bless doesn't call S_reset_amagic */
sv = retrieve(aTHX_ cxt, 0); /* Retrieve <object> */
+ cxt->in_retrieve_overloaded = 0;
if (!sv)
return (SV *) 0; /* Failed */