Load times in flash

Post all technical issues and questions here. We'll gladly help you wherever we can.
Post Reply
User avatar
Vinny Vodka
Explorer
Explorer
Posts: 86
Joined: Sun May 16, 2010 5:17 pm

Load times in flash

Post by Vinny Vodka »

Is there any way to speed up the load times for pictures and sounds in flash? Pre-loading all the images would be preferable. Also, do things like choosing random pictures ~ as in pic(*.jpg) ~ slow down the load times?

Edit - After experimenting, it appears that using random pictures or sound does considerably slow down page load times.
User avatar
Nezhul
Experimentor
Experimentor
Posts: 2373
Joined: Fri Apr 30, 2010 6:22 am
Sexual Orientation: Straight

Re: Load times in flash

Post by Nezhul »

it aint slowing timers a single bit. When program picking 1 of 18 files using random algorythms, your computer fon't even be able to draw 1 single frame on your monitor. It's so fast thet you could say it's instant in our case.

Your problem is in the size of pictureas and the size of sounds. You see, nyx doesn't have preloading and buffering functions. Every time the new picture appears, it will load it - only then. Before it appears it won't do a thing. Same with sounds. And even if files are relatively small, it still takes some time to parce them and send them to you - and the host's speed is not too fast. It's normal, but aint suited to the fast info transfer. Add ping to this and you'll get pretty good lag sometimes.

Now I'll explain you why you thought that getting rid of randomness busts the speed up. You see, after you once downloaded this pictureas and sounds - they are saved in the temp directory of your browser. So when the page appears again, it won't download the same picture again, but will use the one saved on your PC - and it's faster. What happened to you is: You were testing it as is, and saw the lag of the pictures. While this test most of them were saved on your PC. Then you get rid of random names, and run a test again - woila, they load much faster! The only thing you missed, that it's not because you'v set the names, but because they load from your PC, not the server far, far away.

As an example, while I was running your tease now, the first time I rarely saw any picture and all sounds were stopped in the middle. But when 18 pages passed by, and all started again, everything was fine.
Note as well, that I live in Russia, it's closer to Europe (where the servers reside) than US, and also our internet speeds are WAY faster than in US (10-100 Mbps in general). So in my case pictures will load very fast, but the further the user is from the server, and the slower he's connection, the lag will be greather.

P.s. I don't think there'll be changes in Nyx anymore. As I see it, MIA is on the way and nyx development might be considered as closed. :closedeyes:
Check out my new site, and read SexTV story there!
Also I have the DARK section that features feature Erotic Horror.
I also launched a SubscribeStar recently! Please come check it out!
Updated whenever I feel like it. :wave: :love:
Image
pioneer911
Explorer
Explorer
Posts: 17
Joined: Sun May 24, 2009 2:59 pm

Re: Load times in flash

Post by pioneer911 »

Yep. Even when the tease isn't coded to repeat itself, just let it run to the end and refresh.
User avatar
Vinny Vodka
Explorer
Explorer
Posts: 86
Joined: Sun May 16, 2010 5:17 pm

Re: Load times in flash

Post by Vinny Vodka »

Thanks for the tips Nezhul! That is extremely useful information that will not only help with the gallery but also with any teases I make in the future.

:thankyou:

For Small Gallery, I've reduced the image sizes to 35% of the original, which was about what nyx shrinks them down to anyway. This resulted in about a 90% decrease in file size for each picture. Additionally, I had the start page load all of the images on it so that they would be preloaded into the browser cache before the first run-through. I believe it works as intended now, and I'll try to make sure you won't have to run through and refresh my teases to enjoy them in the future pioneer911.

I don't know if image shrinking feels technically challenging enough for your "Advanced Nyx Tricks" thread Nezhul, but it at least belongs in a Basic Nyx Usage thread, should someone ever decide to make one. ;-)
User avatar
Nezhul
Experimentor
Experimentor
Posts: 2373
Joined: Fri Apr 30, 2010 6:22 am
Sexual Orientation: Straight

Re: Load times in flash

Post by Nezhul »

It's not about coding, so I don't think it belongs there.
Also, even if you don't change the picture in any way, sometimes you can decrease it's size. For example for some .jpg photos you may open it with paint and save as .jpg (again). It looks like we haven't changed 1 bit, and the picture itself will be exactly the same, but the size may decrease dramatically. It's all about how they were encoded by the original distributor.
Photoshop gives even more flexibility.
Check out my new site, and read SexTV story there!
Also I have the DARK section that features feature Erotic Horror.
I also launched a SubscribeStar recently! Please come check it out!
Updated whenever I feel like it. :wave: :love:
Image
seraph0x
Administrator
Administrator
Posts: 2666
Joined: Sun Jul 23, 2006 8:58 am

Re: Load times in flash

Post by seraph0x »

Nezhul wrote:P.s. I don't think there'll be changes in Nyx anymore. As I see it, MIA is on the way and nyx development might be considered as closed. :closedeyes:
There is one last Nyx patch coming. It'll update Nyx from Flex 3.3 to Flex 4.0, so the UI will be a bit sleeker and there are some minor bugfixes in it. Nothing major though.

Vinny Vodka wrote:Pre-loading all the images would be preferable.
FlashTeases currently preload the image for the next page - generally. If it can't predict the control flow (i.e. what page is coming up) then no preloading takes place.

So if you want to improve preloading behavior for your teases, you can make sure your pages don't branch off to too many other pages at once and that pages last longer than about 5 seconds on average.

However if the user's connection is very slow, obviously there is only so much preloading in real-time can do. The reason we don't preload at the beginning of the tease - aside from the obvious problem of having a huge loading time at the beginning - is that most of the time users will only see some of the images in a tease. For HoT2 for example we measured that the average user sees about 9% of the images in the tease. Certainly that tease is an extreme case, but at the same time it illustrates the problem in principle. We neither want the bandwidth expenditure to send out pictures that will never be seen, nor do we want the user to have to download images they'll never need.

And of course since the teases are interactive, it's impossible to know what path the tease will take in advance.

We may some day allow authors to explicitly cache images, but then again there is also potential for such a feature to be overused.
Post Reply