News

  • Home > News

        Code profiler for .NET CF apps now four times faster

        Jonathan Angel | Date: Jun 13, 2008 | Comments: 1



        Eqatec has updated its free code analysis tool for Microsoft's .NET and .NET Compact Framework (CF). Claimed to be the only code profiler available for .NET CF, version 1.2 of the Eqatec Profiler adds a claimed four-fold speed improvement, and several new features.




        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. (For further details, and comparisons to other profiling methods, see our earlier coverage, here.)

        When announcing the product in April, Eqatec CEO Eigil Poulsen told WindowsForDevices.com that the instrumentation code Eqatec Profiler added to assemblies made them from 25 to 50 percent larger than the originals, and caused them to run from 20 to 30 percent longer. While this already outpaced inefficient code profilers -- which can easily make programs run from two to 10 times slower -- Eqatec Profiler has now been sped up significantly, according to the company.

        Eqatec programmer Richard Flamsholt writes on a company blog that when the profiler was tried on an 8MB application, the process of injecting instrumentation code took almost an entire minute. "We had worked hard to make sure the profiler's runtime module was lightning-fast, but [had] not spent so much time optimizing the actual profiling step. It was coded sensibly, of course, but we had never actually profiled it!

        "Since the profiler itself is a .NET app, we simply fed it to itself, generating a profiled version of the profiler, [and] used that to profile the [8MB] World Wind app, and looked at the report," Flamsholt wrote. A small final step turned out to be chewing up a whopping 75 percent of the time; once this was recoded, profiling became four times faster. "All from changing just a few lines of code, within 15 minutes [of getting] the idea to profile the profiler," says Flamsholt.

        In addition to speed, version 1.2 of Eqatec Profiler includes the following additional enhancements, according to the company:
        • A runtime module that can be between five and ten times smaller
        • Support for generics
        • An automatic check for newly available versions
        • Re-signing of signed assemblies
        • Greater ease of use when profiling full .NET applications

        Eqatec Profiler offers a graphical user interace
        (Click to enlarge)

        Eqatec Profiler includes a graphical user interface (above), allowing files to be selected individually. 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.

        Eqatec 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: