tags:

views:

79

answers:

4

A few of my various Eclipse 3.5 (actually SpringSource ToolSuite 2.2) workspaces are painfully slow when building, and I have a suspicion this is because they are continuously grabbing network resources from over the internet (e.g. schemas), whereas other workspaces, with similar content, are fine. Tracking these down is problematic.

Does anyone know how to track these down, if this is in fact what's happening? Something like a log file which tracks each URL being accessed, or something of similar utility.

Edit: I should have mentioned that I've considered using a packet sniffer like Wireshark, but Eclipse generates a lot of traffic, and it's hard to see the wood from the trees. I'm looking for something higher level.

Edit: In the end, it turned out that SpringSource ToolSuite was doing some highly inefficient classpath scanning, slowing things to a crawl. No network access at all, it just felt like that kind of performance hit.

+1  A: 

You can analyze what's going on in your network using a protocol analyzer like Wireshark. Wireshark shows you all network traffic and you can even analyze it's content. You can get it free of charge (open source license).

There is also the possibility to analyze wich application is connected to wich endpoint using a tools like TcpView.

Sylar
+2  A: 

You could simply look directly at the wire, e.g. using Wireshark or using a HTTP proxy like loxy (never tried this one though).

Most likely it's a single resource where the connection times out. This should be pretty easy to spot (i.e. search) and remove from your workspace.

At the Java level, you might use a profiler or instrumentation to track down methods that take a long time to complete.

sfussenegger
hmm, an HTTP proxy is an interesting idea. Eclipse has quite fancy http proxy config options. I'll give that a try.
skaffman
A: 

You can tell Eclipse to use a SOCKS proxy, and then configure that proxy server to dump what it is doing.

I've used JSOCKS for this - http://jsocks.sourceforge.net/ - and put in my personal changes for an inhouse project at http://github.com/ravn/jsocks.

Thorbjørn Ravn Andersen
A: 

If you are using Spring XMLs, Eclipse will validate their schema, which might mean downloading it every time from the web.

You can add these entries to your XML validation catalog as local files, which will prevent them from being downloaded (this is also important when working offline).

Go to the preferences, to XML -> XML Catalog. Some of the entries might already be there (added by Spring IDE, latest versions add that). You can add the rest yourself.

zvikico