15.04.2018 Views

programming-for-dummies

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Creating a Help File 103<br />

Obviously, if you want to speed up your program, you’d focus on the part that<br />

runs most often, and that’s what a profiler does. A profiler examines your program<br />

and identifies the most frequently used parts of that program. After you<br />

know which parts of your program run most often, you can work on making<br />

that part of the program run faster, a process known as optimizing.<br />

Profilers typically use two methods <strong>for</strong> examining a program:<br />

✦ Sampling: This examines your entire program at fixed time intervals.<br />

Through sampling, a profiler can get a rough estimate on which parts of<br />

your program (often referred to as hot spots) are being run most often.<br />

✦ Instrumentation mode: After you use sampling to identify hot spots,<br />

you can use this mode to examine the program in more detail to determine<br />

exactly what each program line does.<br />

By identifying the hot spots, you can speed up your entire program by<br />

rewriting or optimizing those frequently run parts of the program.<br />

By optimizing a small part of your program, such as ten percent of that<br />

program, you can often improve the entire program’s per<strong>for</strong>mance<br />

dramatically.<br />

Book I<br />

Chapter 4<br />

Programming Tools<br />

Creating a Help File<br />

Hardly anyone reads software manuals, so when people need help, they typically<br />

turn to the program’s help file <strong>for</strong> answers. This help file is essentially<br />

the software manual organized as miniature Web pages that you can view<br />

and click to see similar (linked) in<strong>for</strong>mation, as shown in Figure 4-9.<br />

Almost every program has a help file, but creating a help file can be tedious<br />

and time-consuming. So to simplify this process, many programmers use<br />

special help file creation programs.<br />

Just as a word processor makes it easy to write, edit, and <strong>for</strong>mat text, help<br />

file creators make it easy to write, edit, organize, and link text together to<br />

create a help file.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!