| Code profiler helps fine-tune .NET CF apps |
Apr. 30, 2008
Eqatec has released a free code analysis tool for Microsoft's .NET Compact Framework. Claimed to be the only code profiler available for .NET CF, the Eqatec Profiler generates detailed reports, while enlarging binaries less than 50 percent and lengthening runtimes only 30 percent, the company says.
.NET CF programmers have a variety of tools for trying to optimize their source code, including several included with Microsoft's Power Toys for .NET Compact Framework 3.5. For example, the Remote Performance Monitor provides real-time counter data ranging from garbage collector activity to type loading info. Its GC Heap Viewer can capture the managed heap at any moment an app is running to view live references, and allows comparing multiple snapshots to find memory leak issues, says Microsoft.
Also included with the Power Toys is the NETCF CLR Profiler, an allocation profiler. It provides detailed visualizations, and is useful for diagnosing memory management issues, according to Microsoft.
But, says Eqatec CEO Eigil Poulsen, while the above tools can track an application's memory usage and object allocations, they can't help improve an application's performance by pinpointing bottlenecks. "When developing a really large .NET CF application in C# for Windows CE, we looked around for a .NET CF code profiler. Surprisingly, there were none -- so we built our own," he adds.
The resulting product, Eqatec Profiler, works by injecting extra code into existing .NET CF files after they have been compiled. At runtime, this extra code measures the performance of every method, providing a performance report either while a program is running or after it stops.
 Eqatec Profiler has a command-line interface ... (Click to enlarge)
Eqatec Profiler offers a command-line interface, shown above, which can be used to profile .NET assembly files automatically. But it also includes a graphical user interface, allowing files to be selected individually (below). Users can choose whether or not to profile set/get and add/remove methods. Not profiling some methods will make the resulting code run faster, but also means the time spent executing those particular methods cannot be measured, notes Eqatec.
 ... and a graphical user interface (Click to enlarge) The instrumentation code Eqatec Profiler adds to assemblies makes them from 25 to 50 percent larger than the originals, and causes them to run from 20 to 30 percent longer, according to the company. This is actually quite impressive, Poulsen told WindowsForDevices.com, because inefficient code profilers can easily make programs run from two to 10 times slower.
Once assemblies have been moved to a device and then run, Eqatec Profile saves the resulting performance data as an XML file. The file is then moved via SD Card or USB transfer to a desktop PC, where it can be opened using Eqatec's Profile Viewer application (seen below).
 Eqatec's Profile Viewer (Click to enlarge) The upper half of the Profile Viewer display shows a list view with a grand total for each method: how many times it was called as the program ran, and how long that took. By highlighting a particular method, users can drill down, getting information on particular calls into and from the selected method. Yellow bar graphs show how much time each caller spent calling the selected method, while red bars show how much time was spent internally in the selected method and by the methods it called, says Eqatec.
A "work in progress," Eqatec Profiler does have some known limitations, which the company says it plans to fix. These include:- User-defined generics are not supported
- Strong-name signed assemblies are not supported
- No debug information is available for the profiled assemblies
- There is presently no Visual Studio integration
Equatec Profiler is available in two different versions, both free. A "basic" version requires no registration but comes only with the graphical user interface. The "full" version, provided in return for a user's name and email address, adds a command-line interface to the mix.
Both versions of Eqatec Profiler are downloadable from the company's website, here. A pair of videos demonstrating the tool may be found here.
Related stories:
(Click here for further information)
|
|
|
7 Advantages of D2D Backup
For decades, tape has been the backup medium of choice. But, now, disk-to-disk (D2D) backup is gaining in favor. Learn why you should make the move in this whitepaper.
4 Legal Reasons to Control Internet Access
The Internet is obviously a valuable resource for many organizations. However, many are exposed to legal liability concerns because they fail to control Internet access. Learn if you're safe in this white paper.
Rapidly Resolve J2EE Application Problems
Whether you are in the process of building J2EE applications or have J2EE applications already running in production, you must ensure that they deliver the expected ROI. Learn how in this white paper.
Load Testing 2.0 for Web 2.0
There are many unknowns in stress testing Web 2.0 applications. Find out how to test the performance of Web 2.0 in this white paper.
Build Better Games Online
For the game infrastructure providers, life is complex. Making money from games has become more complicated. Why? Find out in this white paper.
Building a Virtual Infrastructure from Servers to Storage
This white paper discusses the virtual storage solutions that reduce cost, increase storage utilization, and address the challenges of backing up and restoring Server environments.
Gaining Faster Wireless Connections with WiMAX
Welcome to what is quickly becoming the hyperconnected world where anything that would benefit from being connected to the network will be connected. Learn more in this white paper.
Is Your Desktop a Security Threat?
The new wave of sophisticated crimeware not only targets specific companies, but also targets desktops and laptops as backdoor entryways into those business’ operations and resources. Learn how to stay safe in this white paper.
Increasing SAN Reliability by 100 Percent
Storage area networks (SAN) are a strong part of storage plans. Learn how to increase your reliability and uptime by 100 percent in this case study.
|
|
|
|
|