Bug 20949 - [ExternalTools] Log Console extremely slow
Summary: [ExternalTools] Log Console extremely slow
Status: RESOLVED DUPLICATE of bug 25437
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.0   Edit
Hardware: PC Linux
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords: ui
Depends on:
Blocks:
 
Reported: 2002-06-25 11:05 EDT by Bradley McLean CLA
Modified: 2002-11-11 11:11 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bradley McLean CLA 2002-06-25 11:05:56 EDT
Running a moderately large ant project with a fair amount of output (900 lines).  It appears to take 3 to 10 seconds to 
display each line in the console log, which slows a 7 minute build to something over an hour! 
 
For builds with no errors, this is a non issue, because the log can be turned off.  For tracking build errors, though, it's 
agonizing.
Comment 1 Nick Edgar CLA 2002-07-04 11:25:55 EDT
Please investigate.

Bradley, are you on Motif or GTK?
Comment 2 Bradley McLean CLA 2002-07-04 12:04:47 EDT
I use Primarily GTK, but I've tried on both versions.

Running on a 512Mb 1Ghz laptop, under RH7.3 with Sun JDK 1.4

This may be a case where it slows over time; the later lines seems to take
longer to display than the earlier ones.  No idea whether it's something to do
with the messages (listeners?) or just the data structure behind the log window.

-Brad
Comment 3 Ryan Cooper CLA 2002-07-04 13:37:29 EDT
Brad, could you attach the Ant script you are using to the PR (or a sample 
script with the same effect)? Have you tried other Ant scripts? If so, does the 
same thing happen, or is the output fine for other scripts? 

Does the output contain a lot of different levels of output (i.e. different 
colors)? 

How much does the output slow down as the script runs? Is it barely noticable, 
or a marked difference?
Comment 4 Bradley McLean CLA 2002-07-04 21:44:50 EDT
Okay, consider the following two files as a project ( a contrived example using
javac warnings to trigger the condition)

build.xml:
<project name="Discovery" default="compile" basedir=".">
        <target name="compile">
                <delete file="Dummy.class"/>
            <javac srcdir="." destdir="." debug="on">
        </javac>
        </target>
</project>

Dummy.java:
public class Dummy {
    static int assert;

    public static void main(String[] args) {
        assert = 0;
        assert = 0;
        // ... repeat as needed
    }
}


I ran it with 160 'assert = 0;' statements.  It took 2 seconds on the command
line with ant, and over five minutes inside Eclipse.  It definitely slows with
each line of output.

(Note that this requires jdk1.4 to  trigger the warning message about 'assert').

-Brad
Comment 5 Max Rydahl Andersen CLA 2002-09-29 11:58:00 EDT
I just want to confirm this experience of having a very! slow output.

While looking for an 
answer I discovered that LogDocument uses syncExec instead of asyncExec to add messages to the 
output - could'nt this be changed to asyncExec so the ui-update does not slow down the build process 
?

Just a thought.
Comment 6 Darin Swanson CLA 2002-10-14 21:16:14 EDT
The syncExecs have been removed in favor of asyncExecs as the syncExecs were 
unnecessary and were causing deadlocks.
Comment 7 Darin Wright CLA 2002-11-11 11:11:05 EST
The log console will be removed - the debug console is now used for external 
tool output.

*** This bug has been marked as a duplicate of 25437 ***