optimization

Flashbug – An extension for Firebug

Friday, October 2nd, 2009 | Projects | 91 Comments
Version 1.6.3, Updated March 30, 2010
  • Compatibility: Firebug 1.05 (Firefox 2), 1.3 (Firefox 3), 1.4 (Firefox 3.5), and 1.5 (Firefox 3.6)
  • File Size: About 55Kb
  • Change Log

Download Flashbug 1.6.3 from Add-ons for Firefox

Submit Bug Reports / Feature Requests

BETA Channel Update – 1.6.4 RC2

  • RC1
  • Better error message when unable to clear log file
  • Correctly Clear log file
  • Fix mm.cfg location on setups where My Documents is placed different than default
  • RC2
  • Fixed mm.cfg location on Vista (regression)
  • Fixed Ubuntu Trust File
  • Updated Player Version display

What’s New

  • Fixed SharedObject discovery bug
  • Fixed Mac OSX mm.cfg location, for real this time

Description

This will display any traces from any .SWFs running currently (in Firefox or outside of Firefox). All the traces are displayed in a Flash Console tab in Firebug. You can search using the search box in Firebug to highlight any matches. Another added feature is line highlighting and icons for errors, warnings, and info traces. Finally, for any urls that appear in the traces, you can right-click on them to open them in a new tab.

Like FlashTracer, it is required to have the Flash Player Debugger installed or you will not see any traces. Flashbug will tell you the version of Player detected on your system. If you do not have the Debug version, it will give you a link to download it.

Unlike FlashTracer there is no need to configure the flashlog.txt or mm.cfg files. This is all handled in the background by Flashbug so you can just get straight to working.

You can now open either the Trace or Policy log directly from Flashbug. This is to help allow people who want to either export or copy the raw traces directly.

Also new is the Shared Object inspector. This works by listening to all the SWFs that are loaded for the page you are on. It then checks based on the domain against the Shared Objects stored on your computer. If it finds any, it will list them in this panel.

Each row will list a Shared Object found, which you can expand to see the data stored within. You can also right click to open the file directly, if you have an editor installed. Or you can copy the path to the file, or even open the containing folder.

Finally, there is AMF decoding added to the Net Panel of Firebug. This is available only for Firebug 1.4+. If you visit a site that relies on remoting for data transfer you can now inspect the AMF Request being sent to the server. To do this, find the row in the Net Panel that is the AMF Request, and expand it. Once expanded you will see an AMF tab, clicking this will display the AMF message in it’s entirety for you to inspect.

Features

  • Utilizes Firebug’s built in search feature – When you search for any words in the logs, the words will be highlighted in real-time.
  • Displays Trace logs – Displays the traces emitted from all Flash instances playing in any browser.
  • Displays Policy logs – Displays the policy log traces emitted from the Flash Player. These traces usually occur when using cross-domain policies or loading assets from a different domain.
  • Automatically setup Debug Player for logging – In FlashTracer you were required to manually configure the log file location. This is now handled automatically by the extension.
  • Configure Debug Player settings – The Flash Player itself can be configured to trace out data differently. Those options are available in the preferences window.
  • Trace filters – There are a few builtin filters to display your traces differently. If you want to trae an error, it will be traced out in red with an error icon. If you want to trace XML, using the xml keyword, Flashbug will format the xml in a readable and colored format. Below is the list of keywords currently built into Flashbug. In the future I plan on making this customizable.

    - @@XML@@ : Formats it into ‘pretty’ XML with coloring
    - @@HTML@@ : Same as XML
    - @@INFO@@ : Displays a blue information icon to the left
    - @@WARNING@@ : Background is a teal with an warning icon to the left
    - @@ERROR@@ : Background is a light red with an error icon to the left

  • Built-in Links – Any URLs that are detected in the traces will be dot underlined. You can then right-click on them to open that URL in a new tab or copy the location to the clipboard.
  • Read SharedObject – Read any Shared Objects associated with a page. You can inspect them just like object in Firebug.
  • (For Firebug 1.4+) Read AMF/Remoting Request/Response Data – View AMF data sent to and from the page to the server.

› Continue reading

Tags: , , , ,

Notes: Loop Optimizations 2

Tuesday, September 8th, 2009 | Notes | 2 Comments

This is kind of an extension of my previous loop tests I did. I ran into this while making improvements to Orion. I was really surprised there was this much of a difference in speed. The discovery I made after looking into BetweenAS3 and the efforts of Joa Ebert on his AS3 particles I noticed they were using LinkedLists to manage large numbers of objects. LinkedLists are only good if the you don’t have to remove items from the list as that can be a painful experience. But adding to and iterating through the list is blazing fast as denoted below.

› Continue reading

Tags: ,

Notes: Positioning Optimizations

Tuesday, April 7th, 2009 | Notes | 1 Comment

This page sort of expands upon the previous post I made on loop optimizations. I’m going to use this post in the future as a catchall for any other optimizations I run across. So for now I just have one to list, but hopefully in the future I’ll add some more.

Edit: (Sept 8th 2009) Ok I was kidding, I think I’m going to make separate posts each time. That way it shows up as a new post and people actually notice it. The “optimization” tag can be used to filter out just these posts.

Modifying a DisplayObject

Using a Matrix to modify a DisplayObject is faster than editing the individual properties.

	// 1 Million runs 2578ms, 2583ms, 2572ms
	spr.transform.matrix = new Matrix(spr.scaleX * 0.98, spr.scaleY * 0.98, 0, 0, spr.x + pt.x, spr.y + pt.y);
	

is faster than

	// 1 Million runs 3597ms, 3609ms, 3569ms
	spr.scaleX *= 0.98;
	spr.scaleY *= 0.98;
	spr.x += pt.x;
	spr.y += pt.y;
	

Tags:

Notes: Loop Optimizations

Tuesday, January 27th, 2009 | Notes | 1 Comment

Here is some testing I did to determine the best kind of loop to use in AS3. In the end the fastest I determined was a simple reverse while loop. Below is the results with the code for my testing beneath that. Where I could, I tried to run 1 million items in the collection. If I was unable to do that (the program would crash) I would run 500k items. From what I have learned, using the Array.forEach() is kinda expensive for what it does. Standard for() loops aren’t too bad, but the for…in() loops are even worse than the Array.forEach(). If you know of anything faster methods or maybe I tested incorrectly please let me know!
› Continue reading

Tags: ,

Search