Manish,

I looked at the Google Maps demo and read the code.  I understand your 
point, and I'm aware that reusing Images (but changing their 'source' 
attribute) is the current best way to repeatedly load external images. 
It's what we do now in this situation.

But it's still not as good as I would like, because Images are merely 
clip holders, not the actual image clips themselves.  Each time one sets 
the "source" attribute, a brand new MovieClip object for the image is 
created via loadMovie() (which clip in turn becomes the 'contentHolder' 
property of the Image).  So we are paying the price of reading in the 
bytes (albeit from the browser's disk or RAM cache, not over the 
network) and reconstructing the player's in-memory movie clip data 
structures over and over again when the same URL is loaded repeatedly. 
(As a side point, I wonder if this is faster for SWFs than for PNGs or 
JPEGs -- perhaps someone has checked?)

Incidentally, the map demo doesn't seem to make use of the browser 
cache.  I displayed the same map view repeatedly by moving the zoom 
control back and forth between the same two values, and it was 
definitely re-fetching the images over the network.  I wonder if images 
retrieved via the Gif2Jpeg proxy servlet have the wrong (or absent) 
cache-control headers?  I would have expected map reloading to be a lot 
zippier even given the current issues with images.

.       .    .  . ...j

> On Fri, 25 Mar 2005 11:20:28 -0500, Joe Berkovitz <[EMAIL PROTECTED]> wrote:
> 
> 
>>> Basically, it would be really helpful to understand how to minimize
>>> overhead for repeatedly loading a movieclip from an external URL,
>>> because even if the URL's response bytes are cached by the browser,
>>> there's still some significant time that it takes to load the clips.
> 
> 
> Have you seen the Google Maps demo?
> 
> http://www.flexauthority.com/Samples/gmap/gmap.mxml
> http://manish.revise.org/archives/2005/02/12/no-more-xml-from-google-maps/
> 
> I'm reusing the same Image objects to display new portions of the map.
>  It's still slow the first time an image is downloaded, but after that
> it's fast.  I simply set the 'source' property of the Image object to
> the new value.  See the code.
> 
> http://manish.revise.org/flash/flex/gmap.zip
> 
> _Reuse_, not duplicate, is the key.
> 
> Manish
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 
> 



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to