[rt-devel] [PATCH] RT::Require faster implementation of eval
"require ...".
Ruslan U. Zakirov
cubic at acronis.ru
Mon Mar 29 01:19:55 EST 2004
Jesse Vincent wrote:
> On Sat, Mar 27, 2004 at 09:13:50PM +0300, Ruslan U. Zakirov wrote:
>
>> Hello.
>>Attached patch represent new function RT::Require which implement
>>eval "require $module". This implementation check
>>"$module::VERSION"
>>before running eval.
>>
>>It shows that my code runs ~3 times faster when module allready
>>loaded.
>
>
> Is this change just because it's "neat" or because you've actually run
> into a measurable delay with the current method? To my knowledge, RT
> doesn't do any "require"s in a tight loop. From your perf tests, it
> looks like the standard method is already pretty fast, relative to
> everything else that RT's doing.
1) it's neat. May be only for me.
2) it could be used not only while other dynamic loading.
3) it checks existence before evaling, it's better in any case.
4) I don't think that this case when features are more bad then good.
5) You could skip it in any case.
Best regards. Ruslan.
>
> Best,
> Jesse
More information about the Rt-devel
mailing list