You are viewing a plain text version of this content. The canonical link for it is here.
Posted to graffito-dev@incubator.apache.org by Alexandru Popescu <th...@gmail.com> on 2006/01/05 17:24:16 UTC

type converters and more

Hi!

In a previous thread I have tried to improve the usage of atomic type
convertors by providing an easier interface and also trying to
partially cache some of the information. But I am still seeing a lot
of object creation, and this is because they cannot leave without a
Session (a ValueFactory, but this is closely linked by a Session).

Considering this, I was thinking to change the strategy and have them
in a visitor like strategy: meaning that you have only an instance of
them, and they receive the ValueFactory together with the object to be
converted.
The benefit is quite visible, having just a few instances around,
being able to lazy initialize them. Having in mind that the API is
still young, I think this is a good moment to change this, than later.

What's your opinion on this?

./alex
--
.w( the_mindstorm )p.

Re: type converters and more

Posted by Alexandru Popescu <th...@gmail.com>.
On my machine this is already done :-). And working like a charm so
far. But I will continue to test it.

./alex
--
.w( the_mindstorm )p.


On 1/5/06, Christophe Lombart <ch...@gmail.com> wrote:
> Excellent !
> +1
>
> Christophe
>
> On 1/5/06, Alexandru Popescu <th...@gmail.com> wrote:
> > Hi!
> >
> > In a previous thread I have tried to improve the usage of atomic type
> > convertors by providing an easier interface and also trying to
> > partially cache some of the information. But I am still seeing a lot
> > of object creation, and this is because they cannot leave without a
> > Session (a ValueFactory, but this is closely linked by a Session).
> >
> > Considering this, I was thinking to change the strategy and have them
> > in a visitor like strategy: meaning that you have only an instance of
> > them, and they receive the ValueFactory together with the object to be
> > converted.
> > The benefit is quite visible, having just a few instances around,
> > being able to lazy initialize them. Having in mind that the API is
> > still young, I think this is a good moment to change this, than later.
> >
> > What's your opinion on this?
> >
> > ./alex
> > --
> > .w( the_mindstorm )p.
> >
>
>
> --
> Best regards,
>
> Christophe
>

Re: type converters and more

Posted by Christophe Lombart <ch...@gmail.com>.
Excellent !
+1

Christophe

On 1/5/06, Alexandru Popescu <th...@gmail.com> wrote:
> Hi!
>
> In a previous thread I have tried to improve the usage of atomic type
> convertors by providing an easier interface and also trying to
> partially cache some of the information. But I am still seeing a lot
> of object creation, and this is because they cannot leave without a
> Session (a ValueFactory, but this is closely linked by a Session).
>
> Considering this, I was thinking to change the strategy and have them
> in a visitor like strategy: meaning that you have only an instance of
> them, and they receive the ValueFactory together with the object to be
> converted.
> The benefit is quite visible, having just a few instances around,
> being able to lazy initialize them. Having in mind that the API is
> still young, I think this is a good moment to change this, than later.
>
> What's your opinion on this?
>
> ./alex
> --
> .w( the_mindstorm )p.
>


--
Best regards,

Christophe