wpg_docload.download_file slow (or has a memory leak)
466586Oct 5 2006 — edited Oct 6 2006Hi, (Maybe this should be in the pl/sql forum, but since this is so much used in Apex and I ran into this problem there, I decided to post it here).
There seems to be a memory leak or some other issue with using wpg_docload.download_file
I have a couple of pages that show many images (50+, icon sized) . And usually a few days after restarting the Oracle http server, I see the image rendering becoming extremely slow (and usually most images timing out.)
So in all my procedures using :
wpg_docload.download_file ( lob_loc );
I switched it out for :
declare
buffer raw ( 32000 );
buffer_size integer := 32000;
offset integer := 1;
begin
while offset < v_length loop
dbms_lob.read ( lob_loc, buffer_size, offset, buffer );
htp.prn ( utl_raw.cast_to_varchar2 ( buffer ) );
offset := offset + buffer_size;
end loop;
end;
And the speed increase in image loading was phenomenal, I am looking at over 10x speed recieving the image data from the webserver.
Is there a known bug with wpg_docload.download_file in 10.2.0.2?
But anyways, if anybody else is running into this slowness, then by all means, try out this workaround.
Regards
Oli
edit:
There seems to be one other thing that matters in the resulting speed of the image retrieval. I used mod_rewrite to make the images look like /icon/1235.jpg
and after further testing, this seems to be the catalyst for image retrieval. Not the wpg_docload.download_file
Message was edited by:
Oli