This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 100766 - FolderInstance.waitFinished() spends too mach time in logging.
Summary: FolderInstance.waitFinished() spends too mach time in logging.
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 98499
  Show dependency tree
 
Reported: 2007-04-12 12:58 UTC by Alexander Simon
Modified: 2008-12-22 11:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2007-04-12 12:58:28 UTC
Method spend about 16% of time at open large c/c++ project on unnecessary logging.
See code fragment:
-----------------------
    public void waitFinished () {
        boolean isLog = err.isLoggable (err.INFORMATIONAL);
        for (;;) {
            err.log ("waitProcessingFinished on container"); // NOI18N
            waitProcessingFinished (container);

            Task originalRecognizing = checkRecognizingStarted ();
            if (isLog) {
                err.log ("checkRecognizingStarted: " + originalRecognizing); //
NOI18N
            }
---------------------
1. "if" is missed in first log. Consume 11% of time.
2. make isLog flag static. Consume 5% of time.
Comment 1 Jaroslav Tulach 2007-04-12 16:58:35 UTC
In 6.0 the code has been changed to use Logger. Its implementation of 
isLoggable is definitely faster, although I have no measurements at hand.