On Thu, Jun 9, 2011 at 9:18 AM, Martin Dias <tinchodias@gmail.com> wrote:
Hi Eliot,
I am glad to receive your feedback. I definitely agree with that, your changes have been added on last version.
The reason for that cached information was mainly to support a Mariano's project requirement: he needs to frequently do lots of small serializations.
Exactly. I was the guilty. In fact, at the beginning this was exactly as you suggested now. And I ask Martin to change it heheheh.
But in any case, that cache should be managed externally of Fuel.
Yes, I can do that.
In my computer, this bench: [ FLGlobalMapper newWith: nil ] bench.
went from '402,000 per second' to '35.8 per second'. But in the common use case of a serializer it is really imperceptible.
Thank you very much. Martin
On Wed, Jun 8, 2011 at 5:20 PM, Eliot Miranda <eliot.miranda@gmail.com>wrote:
On Wed, Jun 8, 2011 at 11:59 AM, Eliot Miranda <eliot.miranda@gmail.com>wrote:
Hi Mariano and Martin,
some feedback. The ClassPoolBindings cache in FLClassPoolAssociationMapper feels like a mistake to me. I would just compute this map at the start of serialization. It'll take hardly any time. Whereas there's lots of scope for this information, if cached, to become stale over time.
Find attached. If you're happy with this then before or after remember to evaluate SystemChangeNotifier uniqueInstance noMoreNotificationsFor: FLClassPoolAssociationMapper
and the same goes for FLGlobalMapper. Also remember SystemChangeNotifier uniqueInstance noMoreNotificationsFor: FLGlobalMapper
best Eliot
-- Mariano http://marianopeck.wordpress.com