MACROMEDIA FLEX 2-TESTING FLEX APPLICATIONS WITH MERCURY QUICKTEST PROFESSIONAL Manuel d'utilisateur Page 16

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 27
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 15
495 CHAPTER 23 Debugging and testing
Object count/object allocation —How many objects have been instantiated? What if
you have many instances of the same object? For example, if you can use fewer
instances, you’ll save on overhead.
Object size—How big are these objects? For objects that have many instances, is
their combined size a concern?
Garbage collection—By default, Flex takes care of destroying objects when they’re
no longer needed. Garbage collection is the process of recovering the memory
that they once held. It’s possible that objects may linger for a while before this
process occurs (which causes memory leaks), so you may want to add logic in
these cases to explicitly destroy them.
Using the Profiler is similar to using the Debugger: you launch the tool from Flex
Builder.
LAUNCHING THE PROFILER
You’ll find the Profile button on the toolbar in Flex Builder, beside the Debug icon.
If you click it, the window shown in
figure 23.5 opens, where you can select
what you want to watch.
The settings in the dialog box are:
Connected From—The server you’re
connected to (or localhost, if it’s the
same computer).
Application—Path to the Flex applica-
tion’s
SWF file.
Enable Memory Profiling—Enables the
tracking of memory usage.
Watch Live Memory Data—Memory
tracking will occur if Enable Memory
Profiling is selected. Watch Live
Memory Data indicates whether you
want to watch it in the Live Objects view.
Generate Object Allocation Stack Traces—Lets you track how objects are created.
Enable Performance Profiling—Lets you watch where processing time is spent.
You could use all of these options all the time; the only difference is how much profil-
ing data is generated and the performance impact while profiling is running.
Launch the Profiler to see it in action, as shown in figure 23.6.
The Profiler functions similarly to the Debugger. After you’ve launched it, switch
back to Flex Builder to control the application’s execution.
Figure 23.5 Launching the Profiler prompts
you with configuration options.
Vue de la page 15
1 2 ... 11 12 13 14 15 16 17 18 19 20 21 ... 26 27

Commentaires sur ces manuels

Pas de commentaire