bonhamjh
Members-
Content count
4 -
Joined
-
Last visited
Everything posted by bonhamjh
-
High CPU Usage, Browser Crash with wmode and Multiple Graphs
bonhamjh replied to GregorTP's topic in Bug Reports
One last note. I noticed everyone talking about this being a browser issue or Firefox issue. It isn't. This is all comes down to the swf files themselves how good the hardware is you have it running on. Since the swf files are rendered locally it will be specific to each computer accessing your charts. If you've got a lot of high end graphics computers going to them they'll be fine. If you've got a lot of the average corporate low end machines accessing them they'll be slow which is why you'll want to remake the swf files with lower frame rates. Again, Fusion Charts could and should change these files to use lower frame rates so that this isn't an issue. You can't really tell the difference between one of these charts loading at 120 fps or 60 fps. And the end users really won't. Have a good one. :smooooth: -
High CPU Usage, Browser Crash with wmode and Multiple Graphs
bonhamjh replied to GregorTP's topic in Bug Reports
Sine909, I just sent an email reply back to you that explains the process. You only have to do this once per swf you want to change then point your chart pages/containers to that file. As to why Fusion Charts can't do this I don't know. It's only one setting when creating the swf in Adobe so it would be easy to change it. Since the files are protected I can't edit them in Flash so the PEAR way was the only free way I could find, and it's easy. Like I said you can do this on a desktop or laptop once to each swf. You can make the new file name the same as the Fusion Charts version if you want so you don't have to change anything in your pages. Hope this helps everyone. I had a page with 15 charts on it and started noticing this slow down as well so the PEAR route was a very welcome surprise. Thanks again emageren for providing it! -
High CPU Usage, Browser Crash with wmode and Multiple Graphs
bonhamjh replied to GregorTP's topic in Bug Reports
The solution from emageren above works perfectly. Here's a more detailed step by step process of getting it up and running if needed. By the way, I'm testing this on a wamp stack installed on Windows XP Pro running MySQL 5.1.24rc, PHP 5.2.6, and Apache 2.2.8 so these instructions are for that type of environment. If you're on Linux none of this should be an issue. 1. Download and install PEAR from http://pear.php.net/package/PEAR/download. Read through the documentation to get it installed. If you don't have a program to unzip tar.gz files then download 7zip and install it. You'll have to extract the gz 1st which will leave you with a tar to extract. If you have wamp installed just go to the wampbinphpyour-php-version folder and run go-pear.bat. Take note of where PEAR.php are and tell it to add the path to your environment and htaccess docs. 2. Download the PEAR File extension from http://pear.php.net/package/File and extract it. Place File.php and the File and tests folders where ever you want, but be sure to tell File.php where the folders and PEAR.php are. require_once('path to PEAR.php') etc. 3. Download the PEAR SWF writer from the link emageren gave in number 3. Place it where ever on your web server and tell it where File.php is. 4. In your pages that load these charts add the php require statement to the top with the correct path to File_SWF.php. <?php require_once('File_SWF.php'); ?> 5. After the body section of you page before the queries and settings that feed your chart place the code in step 5. posted by emageren. Change the swf file names and paths on the first and last lines to where ever you want or to the folder holding your swf files. Change the swf file name and path on line 3 pointing to the Fusion Charts swf to whichever chart you want to redo. Change the setFrameRate() value to whatever you want. I lowered all of mine to 40. If you have tons of charts on your page (more than 20) you may want to lower it to 20 or less depending. Just toy with it and see. Here's an example from my page: <?php //remake swf file to change FPS from 120 to 50 so pages with many charts don't hang if(!file_exists('../Flash/newLineChart.swf')) { $flash = new File_SWF("../Flash/FCF_Line.swf"); if($flash->is_valid()) { $flash->setFrameRate(50); $flash->write("../Flash/newLineChart.swf", 1); } } // Connect to the DB $link = connectToDB(); //Before this insert your code to connect to database (MySQL) = $link $strQuery = [code/] 6. In your echo renderChartHTML or in your $FC explanation statements change the name of the chart to the one you're going to create. [code] //Create the chart echo renderChart("../Flash/newLineChart.swf", "", $strXML, "", 405, 300, false, false);[code/] 7. Open your page and watch the the slowness! Afterward go to the folder your flash chart files are in or the folder you told it to make the new swf file in. You'll see the newly created swf file. Point all your pages that use that chart to the new file. :w00t: