SUN image cache performance

Hi,
I recognized a large delay when accessing dynamically generated images via Applet.getImage(myServletURL), it took up to 2000+ms per image to load its content completely. Then I cleared all temporary files using the Java 1.6_02 control panel, and times suddenly decreased to 150ms average per image.
Local caching seems to work very slow at least for my case. I already limited hard disc space for storing temporary files to 10MB, but this did obviously not help. What settings should I use?
Thank you for any suggestions!

I made some further tests...
If I enable the option "Keep temporary files" in the java 1.6 control panel and load sequentially about 200 quite small dynamically created images, the time for loading an image increases from initially 150 ms stepwise to 450 ms. After closing all browser and Java instances and load the same images, the first image already needs about 450ms(!) to load.
If I disable the option "Keep temporary files" in the java 1.6 control panel, these delays do not occur, even after loading 200 images.
This situation is bad: Either I disable the option and have slow startup time because all JARs need to be loaded. Or I enable it and I run into performance problems when loading (dynamically created) images.
Any Ideas?
Note: the applet is unsigned (signing is currently not an option for us). Since the requested images have to be fetched from another server, I have to access them over a proxy and cannot access them directly as .png etc. But I'm not sure if the file extention plays any role for the cache.

Similar Messages

  • Strange image-cacheing in Internet-Explorer with Java1.5-Applet

    I have written a Java-Applet for showing image-slideshows.
    In short words, the applet loads an image, scales it to screen-size,
    and loads the next image when one clicks on the applet.
    The applet causes a problem in MS Internet Explorer. The memory allocated by an image is never freed. After about 30-40 images, more tham 100MB are allocated by the JVM and the JVW crashes throwing an OutOfMemoryError.
    The same Applet runs fine on Netscape and Mozilla. Here, the memory allocated is always between 8 and 25 MB, even after sliding through hundreds of images.
    Some more coordinates:
    The applet is written in Java1.5 source code. My test-system is a P4 with Windows XP SP2. I have tried out Sun's JVM 1.5.0_03 and BEA's JVM JRockit 1.5.0_02 as browser-plugins, both cause the same problem in MS-IE6.
    I have tried to replace Applet.getImage() by com.sun.image.codec.jpeg.JPEGCodec.decodeAsBufferedImage() - same results.
    I have tried to flush any loaded images explicitely in the Applet.stop()-method, but no effort.
    The images are definitely not stored in some static containers inside my applet. The problem occurs on the level of the JVM/browser-constellation.
    Now my question: Is there any trick to affect the cacheing-mechanisms of the JVM? Image.flush() does not solve the problem.
    Is this a Java1.5 bug? Or a MS-IE bug?
    Is there anything that I did not consider?
    Thanks in advance

    I have written a Java-Applet for showing image-slideshows.
    In short words, the applet loads an image, scales it to screen-size,
    and loads the next image when one clicks on the applet.
    The applet causes a problem in MS Internet Explorer. The memory allocated by an image is never freed. After about 30-40 images, more tham 100MB are allocated by the JVM and the JVW crashes throwing an OutOfMemoryError.
    The same Applet runs fine on Netscape and Mozilla. Here, the memory allocated is always between 8 and 25 MB, even after sliding through hundreds of images.
    Some more coordinates:
    The applet is written in Java1.5 source code. My test-system is a P4 with Windows XP SP2. I have tried out Sun's JVM 1.5.0_03 and BEA's JVM JRockit 1.5.0_02 as browser-plugins, both cause the same problem in MS-IE6.
    I have tried to replace Applet.getImage() by com.sun.image.codec.jpeg.JPEGCodec.decodeAsBufferedImage() - same results.
    I have tried to flush any loaded images explicitely in the Applet.stop()-method, but no effort.
    The images are definitely not stored in some static containers inside my applet. The problem occurs on the level of the JVM/browser-constellation.
    Now my question: Is there any trick to affect the cacheing-mechanisms of the JVM? Image.flush() does not solve the problem.
    Is this a Java1.5 bug? Or a MS-IE bug?
    Is there anything that I did not consider?
    Thanks in advance

  • Mail attachment image caching problem with C7

    Using C7-00 and Mail for Exchange with up to date software. I received two Mobile Boarding Pass emails from Lufthansa for my flights. These emails contain barcode.gif as an attachment that one can show at the gate when boarding. Now the two emails contain attachment with same name (barcode.gif) and the images are equal in size too. The problem is that for the second mail the phone shows the attachment of the first email!
    I have read that Symbian^3 has for performance reasons aggressive image caching feature. But in this case this causes a real nasty bug!
     - Juha

    I have found a solution.
    In the IMG src tag we had been using /images/gfx/image.gif
    By changing this to /./images/gfx/image.gif the images are no longer cached and update immediately when changed.
    PQ

  • Mail attachment image caching problem

    Using C7-00 and Mail for Exchange with up to date software. I received two Mobile Boarding Pass emails from Lufthansa for my flights. These emails contain barcode.gif as an attachment that one can show at the gate when boarding. Now the two emails contain attachment with same name (barcode.gif) and the images are equal in size too. The problem is that for the second mail the phone shows the attachment of the first email!
    I have read that Symbian^3 has for performance reasons aggressive image caching feature. But in this case this causes a real nasty bug!
     - Juha

    I have found a solution.
    In the IMG src tag we had been using /images/gfx/image.gif
    By changing this to /./images/gfx/image.gif the images are no longer cached and update immediately when changed.
    PQ

  • How can i convert an image into gif file as jpeg by using com.sun.image.*

    please help me to convert an image into gif format. i have used sun's impl com.sun.image.code.jpeg package to convert a buffered image into a jpeg file. is there any implementatioln available from sun to handle gif files.

    Many. Try for instance google with 'java image encoders'. Go to the URL http://www.google.com/search?q=java+image+encoders and be amazed of the wonders of modern web search tools.

  • Image cache not working with Firefox and apex

    Hi,
    I'd like to cache all my images to save page rendering time and bandwidth because my images are all static and never change.
    I use the John Scott's caching technique Link: [http://jes.blogs.shellprompt.net/2007/05/18/apex-delivering-pages-in-3-seconds-or-less/], in a few words this technique consists of adding a header line "Expires: date in the future" in the http response.
    It works very well in IE, the images are cached and the same image can be accessed several times (within the same session or in different sessions) without issuing an http request to the server each time.
    with Firefox it does not work, the same image is asked again and again to the server (i'm using FF 3.5 and APEX 3.2).
    - Is it a date format problem? no, because when i type about:cache in FF, i can find my image in the cache with an expire date in the future.
    The weird thing here is that the counter is incremented each time u request the image, so FF knows it is in the cache and even if the expire date is in the future, FF asks it again to the server.
    - Is it a FF bug? If u read the http specs or if u google a little, u can come to the conclusion that FF does not follow the standards,
    but... images.google.com for example manages to get its images cached with FF.
    They use an http response header "cache-control: public, max-age=604800".
    I tried the same and all kinds of combinations but without success.
    When i compare my image with the one from google in the FF cache, they both have the same attributes.
    - It's not an apex issue neither because it works with IE, most probably an incompatibility between apex and FF?
    Maybe the use of cookie? or the http request (not the response) containing "cache-control: max-age=0"?
    I've found so far 2 half solutions:
    1) use ETag and modified date, see the Tyler Muth's note Link: [http://tylermuth.wordpress.com/2008/02/04/image-caching-in-plsql-applications/].
    with this technique FF continues to send request each time but the answer is shorter because it's just a "304 not modified" instead of "200 OK" (200 response is bigger as it contains the image).
    it's better than nothing but you still have 1 request + 1 response for nothing.
    Another problem is that you need SYS access to implement this, which is not possible on an hosted server. (note that for images from the file system it is already foreseen by apex 3.1, Tyler's note is for images from the db)
    2) if you preload the image (using myimage=new Image();myimage.src='...';), then there is max 1 request per browser session.
    There are 2 minor issues here:
    - no caching across sessions
    - if u don't want to preload all the images (example a page with lots of thumbnails, when user clicks it show a bigger image, in that case the thumbnails can be preloaded but overkill for the big images), then you need to load the image, wait until the image has loaded before displaying it, it does not slow down the execution, but requires some extra JS.
    I'm not asking anyone to investigate it, i can live with the 2 workarounds,
    but just in case someone encountered the same problem and already fixed it.
    Let me know if u managed to use the John Scott's technique with Firefox. (U can use Firebug to see the http traffic)
    Thx
    Tim

    Hi Anshul, hope these help. Let me know if you need to see anything else.
    Best,
    Menu Settings:
    Tab Hyperlink:
    Label Text with with hyper link option not available (works as a hyperlink in chrome and IE though):
    Thanks for the help in advance!

  • Messages Opening Image Cache Folder when Sending Files

    Messages / iChat seems to be opening my image cache folder every time I send an image to my contacts the image cache folder opens in Finder and stays open with the copied image. Is there a way to get rid of this? It's really annoying. It started happening after I updated to Mavericks.
    Thanks!

    Hi,
    I don't have an answer for this one.
    Are you finding those items are zipped before Sending ?
    Where are they from?
    I get them zipped when sending a pic dragged from a Browser or from iPhoto but not from the Desktop or a Finder window.
    10:44 pm      Tuesday; November 5, 2013
      iMac 2.5Ghz 5i 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • How to disable image cache in Mail 7

    I urgently need to disable the image cache in Mail 7. How can I do that?
    Reason: I regularly get mails with image files that are essential parts of customer orders. The image content is different in each mail, but the filename is the same.
    Mail 7 displays the same image in every mail until I restart it, it obviously displays a cached file instead of the original image.
    Where is the Mail-cache-file? Can I writeprotect it?

    I think Private Browsing might be what you are looking for,
    have a look here for more info
    [https://support.mozilla.com/en-US/kb/Private%20Browsing]
    also not sure how much access you have on a company workstaion to change settings in Firefox
    Hope this helps :-)

  • How to get import com.sun.image.codec.jpeg.*;..Help..

    I’m doing a research for video compression n I need to compress the frame as image, I want to use com.sun.image.codec.jpeg.* , but I can’t download the plugin every where. I use JDK 1.5.0 to do my java program. Does any one have a suggestion about my problem? What should I do, so I can use com.sun.image.codec.jpeg.*?
    thanks

    That is part of the following:
    [http://java.sun.com/javase/technologies/desktop/media/2D/]

  • Web template image cache

    goodmorning everybody,
    does anybody know where I can clear the image cache when running a web template.. It keeps displaying the old image even though I replaced the image with a new one in the mime repository...

    hi Joris,
    try
    - WAD menu tools -> setting -> delete cache -> delete cache
    - delete browser cache (Internet Explorer or other)
    and
    - SMICM->go to->HTTP server cache->invalidate->golbal in system
    or transaction rsrt -> cache monitor -> delete
    - transaction RSRCACHE
    oss note 456068
    Mime Repository Icons
    How to clear Cache in SAP BW
    hope this helps.

  • Image Caching

    Hi
    I'm trying to implement Image Caching on an Oracle XE database following Tyler Muth's blog post http://tylermuth.wordpress.com/tag/oracle-plsql-images-caching/
    Has anyone managed to implement this successfully?
    I've run the following as sys :
    begin
    DBMS_EPG.SET_DAD_ATTRIBUTE (
       dad_name    => 'APEX',
       attr_name   => 'cgi-environment-list',
       attr_value  => 'HTTP_IF_NONE_MATCH');
    DBMS_EPG.SET_DAD_ATTRIBUTE (
       dad_name    => 'APEX',
       attr_name   => 'cgi-environment-list',
       attr_value  => 'IF_MODIFIED_SINCE');
    end;
    /And my function to download the images includes the following:
        v_etag_head := owa_util.get_cgi_env('HTTP_IF_NONE_MATCH');
        v_etag_str := lpad(p_file_id,2,0)||to_char(v_date_last_modified,'DDMMYYYYHH24MISS');
        if v_etag_head = v_etag_str then
          owa_util.status_line(
          NSTATUS         => 304,
          CREASON         => 'Not Modified',
          BCLOSE_HEADER   => true);
          return;
        else
          owa_util.mime_header(v_mimetype, FALSE );
          htp.p('Date: ' ||to_char(sysdate,'Dy, DD Mon RRRR hh24:mi:ss')||' GMT');
          htp.p('Content-length: '||v_file_length);
          htp.p('Content-Disposition: inline; filename="'||v_filename||'"');
          htp.p('Last-Modified: '||to_char(v_date_last_modified,'Dy, DD Mon RRRR hh24:mi:ss')||' GMT');
          htp.p('ETag: '||v_etag_str);
          htp.p('Expires: ' ||to_char(sysdate+(1/12),'Dy, DD Mon RRRR hh24:mi:ss')||' GMT');
          htp.p('Cache-Control: max-age=300');
          owa_util.http_header_close;
          wpg_docload.download_file(v_blob);
       end if;However, owa_util.get_cgi_env('HTTP_IF_NONE_MATCH') always returns null. I've checked using LiveHTTPHeaders and the If-None-Modified is being sent. This is running on a local Oracle XE database (using the EPG), running APEX 4.0.0.00.46 and Windows 7.
    I've searched the forum and there are four other posts that refer to HTTP_IF_NONE_MATCH, however these haven't helped. If anyone has any ideas or needs any more information, please let me know. And if you have got this working I'd love to know how, even just so I know it's possible!!
    Thanks for any help.
    Sara

    Bump.
    Has anyone managed to implement this successfully? Is there anything I can check? Or is this a bug with the EPG?
    This is causing us massive problems and I can't see what I've done wrong. Any help is really appreciated.
    Thanks
    Sara

  • Image Caching issues

    I have a question regarding image caches in Safari. Why is it that when I change an image that is on my website, the changes do not show. I'll upload an image with the same name as the previous one and when I go to the browser and refresh the old image is still there. I've tried to refresh, empty cache, and reset safari. I've also done shift+refresh, option+refresh, etc. When i view the page on a pc the changes are made and if they don't show automatically I just use a shift+refresh on the pc and it works. I've also had the same problem with pdfs.
    Has anyone had this problem and if so do you know if there is anything to be done about this?

    Hi Scott,
    I had the same with my website an I did the following ...
    * Trash the whole Safari cache folder ... empty trash
    Go to: Home>UserName>Library>Chashes>Safari
    By the way to 'reload Safari' it is command-R
    Dimaxum

  • Blog: Image Caching in PL/SQL Applications

    Blog: Image Caching in PL/SQL Applications
    http://tylermuth.wordpress.com/2008/02/04/image-caching-in-plsql-applications/
    Enjoy,
    Tyler

    Anyone? Or is it the wrong forum?
    Alessandro

  • How do I clear Dreamweaver CS6 image cache (on Mac)?

    Hi,
    I have updated a remote image (absolute link) but it doesn't update in DW (CS6). How do I clear the image cache?

    Go to Site menu > Advanced > Recreate Site Cache, and see if  that helps.

  • Clear Image Cache

    hi ,
    in my application i have to cache the image to some extend..
    and that i need to clear the image cache as my url dont
    change.
    is there anyway programatically i can refresh the image ?
    thanks

    "sohilr" <[email protected]> wrote in
    message
    news:ghts86$ls8$[email protected]..
    > hi ,
    > in my application i have to cache the image to some
    extend..
    > and that i need to clear the image cache as my url dont
    change.
    > is there anyway programatically i can refresh the image
    > thanks
    http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf
    Q7

Maybe you are looking for

  • User Interactive reports in background

    Hi all, There is report in CMS which prints collateral sheet, when i run the report in foreground(/ncms_cs) it ask for some input fields like Business partner id , smartform name and output device, after furnishing these details it give a pop saying

  • DMG WONT EJECT BECAUSE IT SAYS ITS RUNNING WHEN IT ISNT

    i have a dmg and when i eject it it says to close apps running off it, but there are none, what do i do

  • Need help posting to domain

    I am trying to use Iweb to post to a dedicated domain. I have used Nvu and Iweb to create acceptable sites, but I run into a wall trying to get them to post with fetch. I thought I followed the instructrions for this and the results on .Mac are very

  • Question on void*__Crun::vector_new function

    Hi, This is using Studio 11 on x86. I am trying to allocate a array of class using MyObject* objs = new MyObject[size]; I notice that this call occasionally ends up calling the destructor of MyObject. The size could potentially be very large. Is it p

  • " Moving records from one subtype to some other subtype "

    Hi, I have some records in IT0105( subtype = 9028 ) and i want to move these records in IT0105 ( subtype = 0001 ). How to perform this.Plz anyone help me in this regard.