Load time issues FLEX swf vs. FLASH swf
Hello,
We are building FLex and Flash apps running on Flash 10.1. In our situation, the load time for a 1080x768 swf is slower when building in Flex than in flash. We have tried useing the preinitialize event to set at least a loading message, but the delay happens before the preinitialize event. It seems to take 1-2 seconds to load the FLex API perhaps? The only visula we can see is the background color of the stage. Even with a simple nearly empty main canvas, the load is slow enough to be noticable. More importanly it is faster when using a FLASH swf ( or pure AS3), so it must be related to the FLex aspect. Is there anyway to cache the common classes or maybe exclude some that are not used?
Thanks,
Jeff Schuenke
The main point of RSLs is to gamble on improving download time of the SWF at
networks speeds. The gamble is that someone has already loaded the RSL so
it gets picked up off the browser cache at hard-drive speeds. If it isn't
true, you pay a higher penalty because you are loading an RSL that has code
in it you aren't using. That's why the total payload is more. For the
record, only the SWF or the SWZ gets loaded, not both. But even then the
total payload would be more.
At home, my DSL/WIFI network gets me about 70KB/sec, so saving 300K would be
a noticable savings. If you are loading off a hard disk, 300K probably
won't be felt.
The startup sequence of a SWF over a network (http or https):
-start streaming in SWF bytes
-when the first frame is downloaded (generally about 80-100K) see how many
bytes are left to download and if there is a lot, show a progress bar
-load any RSLs and wait for their download and initialization
-update the progress bar until the rest of the SWF downloads
-after the SWF downloads:
-initialize styles
-initialize resources
-prepare embedded fonts
-setup managers for popups, tooltips, dragging if needed
-instantiate Application
-verify and initialize all classes needed by Application
-dispatch Application preinitialize
-instantiate the initial set of children for the Application
-dispatch Application initialize
-update progress bar to show "initializing"
-start validation of Application and its children
-continue to do so until all children are measured and layed out
-dispatch Application creationComplete
-add Application to stage (actually systemManager)
-dispatch Application applicationComplete
The startup sequence of a SWF on a hard drive is different. The entire SWF
must be sucked into memory, unzipped (SWFs are zipped by default) and only
then do we get to the steps where we show a progress bar, check for RSLs,
etc.
At 3MB, there might be a noticeable hit. You can find a big image file and
zip it to see if it comes out to about 3MB. Then use the file system to
copy it and see how long that takes and then unzip it and see how long that
takes.
Another place that causes delay is in the validation of children. If the
children's size are not stable right away (because data is coming in that
affects their size) then several validation passes might be taking place.
A common error is to create every child in the app, even ones that aren't
seen or needed right away. That adds work at validation time and delays the
startup process.
I would recommend that you use the performance profiler in Flex Builder to
see where all the time is being spent.
However, 3MB is a big SWF. Use of modules to chop off stuff not needed until
"later" is recommended and will probably be the answer.
Similar Messages
-
Calling flex functions from flash swf (AS3)
Hi all, i'm stuck with communication between loaded AS3 SWF
from Flash and Flex3 project. I use SWFLoader for runtime loading
SWF, call functions inside SWF, but cannot find the way to call
functions declared in Flex project. I try to use ExternalInterface
class, but it does not help me, or maybe i use it incorrect. Is
there a method to call Flex user declared functions from Flash SWF?
All i need is a syntax sample, thank you in advance!Also, application.application will point to the top-level app
scope, even from a loaded swf.
I believe parentApplication will resolve to what you usually
want as well.
For looser coupling, consider using a bubbling event.
Tracy -
Loading time problems (flex 4.1)
Hi.
When I use the Flex SDK 4.1 the loading time of my application is about 30 seconds. When I let the compiler works with the SDK 4.0 the loading time is reduced to about 2 seconds.
Is it normal?
How do I speed up the loading process of the application???Run the profiler to see what is taking all that time.
-
hi,
I have an issue with loading custom compont based on title window.
Problem is creating component take too many large time.
This component based on TitleWindow.
And it included
1.HBox which contain 15 buttons(actually it is also an separate component)
2.TabNavigator which contain 9 tabs(7 of them are custom components)
I have use creation policy all for the tabnavigator,because I can't perform my logic using on demand creation policy.
Note:
If I use creation policy auto,then I can't perform my logic.
eg:cann't call reset methods of components, because sometimes,If I I didn't navigate then it has not been created and Object reference is null.then cann't help.
component is very reusable in my system.But it takes too many time to load.
What can I do? Any suggessons?If you want to go down the creation policy route, set the creation policy to NONE, the use the initialize methods to create them when you have data.
I have a similar project (some code below). In the main <mx:Application/> block, I have a preinitialize method that gets the initial data, the one that is good for tabone then call VSMain.initialize(). This creates the viewstack but only TabOne. The others are created when they are accessed for the first time.
<mx:VBox width="990" paddingLeft="0" paddingRight="0" horizontalCenter="0" height="570" horizontalScrollPolicy="off" verticalScrollPolicy="off">
<mx:ViewStack id="VSMain" width="990" height="570" selectedIndex="0" creationPolicy="none">
<s:NavigatorContent id="one" label="One">
<main:TabOne/>
</s:NavigatorContent>
<s:NavigatorContent id="two" label="Two" creationPolicy="none">
<main:TabTwo />
</s:NavigatorContent>
<s:NavigatorContent id="three" label="Three" creationPolicy="none">
<main:TabThree/>
</s:NavigatorContent>
</mx:ViewStack>
</mx:VBox> -
Hey guys,
I'm having a little issue after having installed bootcamp.
In bootcamp, I am running Windows 7 Home Premium 64-bit.
When I first hit the power button on my mac and hold option, it takes around 2 and a half minutes to load any icons! It just sits there with the mouse and nothing else!
It's really annoying me if I quickly need to boot into windows.
Is there any way I can speed it up at all?
Thanks in advance,
Jamesset windows as the default
do a chkdsk next time
boot from Lion recovery and check the health and repair OS X - use Command-R for recovery mode
set the startup disk to Mac.
hold shift key to do safe boot - will rebuild caches and check disk
restart
and some systems do have long boot times with Windows, not all
unplug any and all peripheral and 3rd party devices too. -
Load time issue for the Crystal Reports
Hello All
My reports take painstakingly longer time to load and display due to the number of records it has to display (~10000 records)
Currently i use the loop approach to provide the logon info for all the reports/subreports. This is the place where i presume it is taking time.
crTables = crReportDocument.Database.Tables
' Loop through each table in the report
For Each crTable In crTables
crLogOnInfo = crTable.LogOnInfo
' Set the connection information for the table in the report.
crLogOnInfo.ConnectionInfo.ServerName = DB_SERVER_NAME
crLogOnInfo.ConnectionInfo.DatabaseName = DB_NAME
crLogOnInfo.ConnectionInfo.UserID = DB_USER
crLogOnInfo.ConnectionInfo.Password = DB_PASSWORD
Log("set login info to main table " & crTable.Name & " location " & crTable.Location)
crTable.ApplyLogOnInfo(crLogOnInfo)
Next
Can i use the following approach instead to provide the same functionality to avoid such nasty loops??
crReportDocument.DataSourceConnections[0].SetConnection(DB_SERVER_NAME, DB_NAME, DB_USER, DB_PASSWORD);
crReportDocument.Refresh();
Thanks in advance
Srivatsa
Edited by: Srivatsa Haridas on Nov 10, 2008 11:02 AMYou need the "loop part" - at least I'd be way more comfortable if you use it. From my experience, you have a more robust app when you loop through the tables.
reason I asked about subreports; if a subreport is inthe detail section and you have a 1000 records in the detail, and the subreport runs per record, you are essentially running 1000 + 1 reports. Obviously this will take a significant amount of time. As it is even 10 to 15 subreports is quite significant as you are running the subreports plus the main report... Possibly the best way for you to compare the speed is not run the report in a CR designer.(e.g.; what I am asking is; OK, the report is slow. Compared to what?) As you are using CR 10.2, I'd recommend downloading an eval of either CR XI r2 or CR 2008 and see how the reports perform there. If the performance in the designer is slow, it will not get any faster at runtime.
The evals can be downloaded from here:
http://www.businessobjects.com/products/reporting/crystalreports/eval.asp
Also will the below line work for my subreports too ?
crReportDocument.DataSourceConnections(0).SetConnection(DB_SERVER_NAME, DB_NAME, DB_USER, DB_PASSWORD)
- it will, as long as the subreports are using the same connection type as your main report. However I really would not get hung up on loop v.s. no loop. As a matter of fact, this subreport database logon uses loop s as well and it is the recommended way of connecting the subreports:
'Log on subreport
crSubreportDocument = crReportDocument.OpenSubreport("Ron")
crConnectionInfo = New ConnectionInfo
With crConnectionInfo
.ServerName = "Rcon1"
.DatabaseName = "Northwind"
.UserID = "tech"
.Password = "tech"
End With
crDatabase = crSubreportDocument.Database
crTables = crDatabase.Tables
For Each crTable In crTables
crTableLogOnInfo = crTable.LogOnInfo
crTableLogOnInfo.ConnectionInfo = crConnectionInfo
crTable.ApplyLogOnInfo(crTableLogOnInfo)
Next
Ludek
Regards -
I have re written one of my applets to use swing. The problem is that I am now getting reports that it is taking minutes for the applet to load.
The jar file is only 126k but it is currently self signed.
Besides a slow internet connection anybody have any idea what could be the cause?
Clients are running java 5 and 6. The one thing I am wondering is if it could be a virus checker causing the issue.
Of course it works fine for me but I plan of setting up more test systems here but I was wondering if anybody might have a suggestion?I have re written one of my applets to use swing. The problem is that I am now getting reports that it is taking minutes for the applet to load.
The jar file is only 126k but it is currently self signed.
Besides a slow internet connection anybody have any idea what could be the cause?
Clients are running java 5 and 6. The one thing I am wondering is if it could be a virus checker causing the issue.
Of course it works fine for me but I plan of setting up more test systems here but I was wondering if anybody might have a suggestion? -
Bringing Flash .swf files into Captivate
Greetings,
I use Captivate 2.0. I have been trying to bring a Flash .swf
file into Captivate with very little success. The flash file is
clickable (so that users can review case study information as they
complete Try It simulations). When I bring the Flash .swf file into
Captivate, it works. However, correction (or failure messages)
display every time the user clicks the Flash .swf file. Is there
anything that I can do within Captivate to stop this issue?
Ideally, I would like the Flash .swf to run on top of the Captivate
file so that users can view the case study details without having
to see the failure messages.
Please let me know if you have any questions about this. I
hope it makes sense to you.Hi Zabcde (or PMW or P?)
Can I just understand (sorry for being thick) your situation.
You're trying to get a flash movie into a captivate session that
the user can work on, see, interact with whilst they're also going
through a Captivate simulation (try it)? Does that mean that slides
are advancing for the simulation whilst you're watching the flash
movie? Or are they watching the Flash movie as a kind of help to
then go and do the Try It session?
If it's the first, then I would suggest calling the Flash swf
and the Captivate swf as seperate instances in flash (using
loadmovienum or something). If it's the second, you should be able
to remove the failure captions from that slide so they don't bug
you.
Apologies if I've got the wrong end of the stick though
Cheers
AJ (jiminiCricket) -
Loading time of Captivate movies within LMS
Hello everyone.
My group created Captivate training modules, published them
as flash files with SCORM tagging, and are working with our LMS
team to view how the modules play within the LMS. Unfortunately we
are running into loading time issues with our movies. In my office
I have a T1 line and I still have to wait several minutes before
our movies begin to play.
Once the moduleas are loaded they play fine. It's just the
load time that I'm concerned about.
Does anyone have any suggestions as to what my group can
attempt to bring down these loading times? As of now all we have
are our modules published as swf files loaded into the LMS.
Any assistance is greatly appreciated. Thanks in
advance.Captivate has a built-in limit of 60% loaded before it starts
playing. I
don't think that can be customized but I could certainly be
wrong.
So things you can do:
1. look to see if you can adjust the amount of the file that
can be
downloaded before the file will play. Perhaps it's just a
matter of not
including a preloading image?
2. Reduce the size of your movies so they download quicker.
Erik
Fatenah wrote:
> Hello everyone.
>
> My group created Captivate training modules, published
them as flash files
> with SCORM tagging, and are working with our LMS team to
view how the modules
> play within the LMS. Unfortunately we are running into
loading time issues
> with our movies. In my office I have a T1 line and I
still have to wait
> several minutes before our movies begin to play.
>
> Once the moduleas are loaded they play fine. It's just
the load time that I'm
> concerned about.
>
> Does anyone have any suggestions as to what my group can
attempt to bring down
> these loading times? As of now all we have are our
modules published as swf
> files loaded into the LMS.
>
> Any assistance is greatly appreciated. Thanks in
advance.
>
Erik Lord
http://www.capemedia.net
Adobe Community Expert - Authorware
http://www.macromedia.com/support/forums/team_macromedia/
http://www.awaretips.net -
samples, tips, products, faqs, and links!
*Search the A'ware newsgroup archives*
http://groups.google.com/groups?q=macromedia.authorware
*The Blankenship Caveat: Note that direct linking to http
content
through any Authorware icon will likely fail if a proxy
server is present!* -
EP Load time is too High - and Browser crashes
Hi,
We have customized Enterprise Portal for our Company. All are going fine, but some users who are in same network as others are facing Long load time issue. It takes lot of time to load the home page and some time it even crashes.
Is there are other reason for such occurrences other than network error, like browser setting or any thing else. Please help me out in this.
Best Regards,
-Shabir Rahim.Shabir,
You might want to look at these threads.
Performance tuning problem
How to guide for Fine tuning the performance of SAP EP
Good Luck!
Sandeep Tudumu -
Hi,
I have a Flex swf loaded into a Flash swf.
I have made the Flex swf transparent, so that the buttons in the Flash swf are visible.
But im unable to interact with the Flash swf buttons.
My Flex swf is working happyily
The Flex swf overlays the Flash swf.
If i change the scrollRect of the Flex swf so the Flex swf is not overlaying the Flash swf i can successfully interact with the Flash swf buttons.
Any ideas?
Regards,
KyleThanks Alex,
I actually found an old post on a forum where you recommended a similar solution (mousesheld.visible = false).
This seems to work although it messes with dragging (my Popups at least).
But i can work with that for now, thanks for your help.
Regards,
Kyle -
Reducing a SWF file size / creating "instance names" for website loading time improvement
Im hoping someone clever can help...
What i have done so far:
1) Created a flipbook using indesign CS5.5 that contains approx 25
images (embedded PNG's), these need to be good quality as this is a
portfolio - I'd also like to keep the 'page curl' effect. This makes the SWF generated cira 25MB.
2) created a Flash website "wrapper" to hold the above flipbook and add
features such as "bookmarks", links to other sites and forward/backward
page navigation buttions.
The issue we have is that because the flipbook SWF is 25MB the site
load time is slow.
What can be done to speed this up without compromising the image
quality?
1) Is there a way to make the indesign SWF smaller?
2) is there a way in indesign to properly give each page an
"instance name" so that they can be controlled from flash and therefore
I can load each pages image as and when needed.
any other ideas?
(If you'd like to visit the website to view the loading issue http://www.lizblackdesigns.co.uk)
Thanks
Lizthese need to be good quality as this is a portfolio
The approach to your portfolio website seems very outdated and will not help you in the near future. Flash is being used less and less with the increase in Mobile Devices being used to access the internet - a large chunk of which include Apple's iDevices which don't support Flash. This alone is a reason not to do it, however there are a few other big issues with the method you have chosen.
There is no "content" on your website for any search engine to find. No text. No meta data. No image alt tags. No titles. Nothing. In other words, your website will not be found by the people you are trying to attract. I would imagine for a portfolio site, you may want to re-think this approach.
The way the Flash file was created is the worst possible way to add Flash to the web as you have only embedded image files - and this is your entire site?! You could have included some text, which would have been viewable by search engines, and used color shapes to increase quality but lower filesize.
The filesize meant it took me over 1 minute to get off your home page. The average internet user will leave your site if you do not keep them interested after 5 seconds. In other words, you should have content of interest viewable within 5 seconds of load time.
If you are set on keeping the Flash setup for your website, re-build using as much text, color shapes and lines as you can (vector work in other words) and do not rasterize/export as image. This will drastically reduce load time and increase quality. You will also want to divide your file into sections and create more than 1 HTML page so that the browser only loads a bit at a time. You might also want to set a maximum size container for the Flash file as on my browser, it looks extremely pixelated and is very large, but unclear.
I would suggest looking into HTML5 if you are keen to create a website that can be viewed by around 98% of the web surfing people and it will also mean you can use an image slider (or similar) to show good quality images of your work. This will aid your site in being found by search engines but will also allow you to update sections of the site without re-publishing the entire Flash file.
Rik -
Using a swf generated by Flex from a Flash component
I know you can include and control a swf generated by Flash
within a Flex component. But can you do the inverse? Can you use a
swf generated by Flex within a Flash project/component?
We plan to develop a "core" module that would be used in a
lot of other Flash and Flex components we'll develop in the future.
This core would be a package of classes that could be easily
re-used by the components. There would be nothing visual in it,
only standard classes.
Even if this core would not contain any visual components, we
would like to develop it using Flex since we prefere Flex Builder
to the Flash editor to code and debug.
But I'm not sure if:
1) A core module like this, developped in Flex, could be used
by our Flash components or only by other Flex components?
2) If we use Flex to generated this core, will the resulting
.swf be bigger than if we would have used Flash to develop it?
Since there will be no Flex visual components in it, maybe it will
be as small? Is there a compiler parameter to tell Flex to only
include the minimum things possible in the generated .swf?
Any help or link about this would be really appreciated!
Thanks you in advance!
P.S. I apologize to those aware that this message was also
posted on another Flex related forum, but I received no reply on
it!try this. for me it has worked.
import flash.net.URLRequest;
import flash.utils.Timer;
var loader:Loader = new Loader();
var timer:Timer;
var myclip:MovieClip;
//load the Flex Component
loader.load(new URLRequest("IS.swf"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
loaderDone);
addChild(loader);
function loaderDone(e:Event) {
timer = new Timer(100);
timer.addEventListener(TimerEvent.TIMER, handleTimer)
timer.start();
function handleTimer(event:TimerEvent):void {
//cast the loader.content into MovieClip to access
currentFrame.
myclip = loader.content as MovieClip;
if (myclip.currentFrame == 2)
however, i need to access properties of IS.mxml..
any data member would work..
or if i could dispatch an event in IS.mxml and catch it in
flash through IS.swf, it would work.
Pls somebody suggest. -
Flash swf loading flashbuilder swf
is there a trick for having a Flash CS4 website swf be able to load a flashbuilder4 generated swf?
doesn't show up.
i remember an issue from Flex3 concerning it locking up the gui unless you had a flex3 canvas or whatnot loaded prior.
fb swf can load by itself fine via its html, and flash swf can load other flash swf's, but i can't get the flash swf to load the fb4 swf.
thxIf you have used fl.. classes in the CS4 swf it might prevent the Flex SWF
from loading, but usually you get errors. -
How to get the content in embed swf file in Swf Loader on run time
How to get the content in embed swf file in Swf Loader on run time
[Bindable]
[Embed(source="assets/index.swf")]
private var SWFSRC:Class;
<mx:SWFLoader id="_swfloader" source="{SWFSRC}" />Hi Flex harUI,
Throw the error.
Access of undefined property content
Maybe you are looking for
-
Verizon DVR / STB Reviews Wanted
Looking for user input on which Verizon STB's and DVR's are the best and why. Interested especially in responses from users who have owned many different boxes. Please list your model #'s and why they are better than / worse than. What are the pros?
-
Purchase requisition not getting generated in MD04
Hi, if i have my material with MRP type VB & my ROL is 10. Now if my stock at present is 0.74KG & if i do the MRP run with MD02 then my purchase requisition is getting generated.now i delete the purchase req & try it with MD01 for the whole plan
-
when i try to add my windows 7 pc to i tunes match, it causes i tunes to crash. I know someone else has had this problem, please tell me how to fix it. I do have the latest version of i tunes software too.
-
Why?
-
Segment level I/O statistics in Oracle 8i
I need to get segment level i/o statistics in Oracle 8i. I am looking at v$session_wait to find out the block id each i/o event is happening to. But for 'db file parallel write' event, there is only number of files and number of blocks info. How do I