[Migrated content. Thread originally posted on 29 December 2004]
I'm making an extensive use of the c$redirect routine.I think the redirect feature is very useful: it lets you create a sort of trigger(s) to perform additional file operations without reworking the application logic: cascade delete(s), additional updates atque cetera.
For these pourposes i write down a "pre" and a "post" handler, that are installed in every program of my application.
The reverse of medal is that the presence of the handlers slows EVERY file operation: the rate of the slowdown is in the range of 10 to 1 !
Of course you can notice it in print programs, or in programs that perform mass update operations, such as monthly invoicing, statistics updating, and so on.
The slowdown remains the same even if I "empty" my handler programs, that now read only:
Procedure Division.
Exit Program.
For this reason it seems that there is something wrong in the internal call mechanism that
triggers the handlers.
My suspect is the runtime feeds my handler programs with the linkage items HANDLER-FILE-INFO (see the "handler.cpy" copy ) looking for the physical file information on disk at EVERY call. If my suspect is exact, why don't take the physical file info at the OPEN call only, and keep them stored for the subsequent calls ? (...if isn't exact, let me apologize for this stupid suggestion..!)
I've sent Acucorp Italy a sample program that opens input a Vision file and performs a read-next cycle on all its 17,500 records: with redirect OFF the process time is in the range of 0.4 seconds, while in the redirect ON scenario it takes about 4 seconds !
Finally, it seems there are not workarounds for this issue... anybody around using c$redirect ? any idea or suggestion ?
thanks in advance to everyone, ciao.
Runtime version 6.1.0
Version 6.1 is even worst :mad:
BTW, wish everybody a happy New Year!