Today, a quick one.
If you work with a lot of projects, opening multiple Java files and performing big searches and refactorings from time to time, you'll notice that Eclipse becomes increasingly slower. This is somewhat similar with the infamous 'Windows rot'. Except, this time you have solutions other that complete reinstall.
Deleting “workspace/.metadata directory” is such a solution, but a violent one, since you lose all your settings and 'non-code' work. And while the settings can still be exported and reimported after the clean restart of Eclipse, there definitively is some data (such as the “Run” list) which has to be rebuilt from scratch. And if the list has tens of items, that's your precious worktime which is lost.
A nicer, less invasive solution is to delete only the resource history and the JDT caching. That means deleting all the content of the directory “workspace/.metadata/.plugins/org.eclipse.core.resources/.history” (but not the directory itself) as well as *.index files from “workspace/.metadata/.plugins/org.eclipse.jdt.core” and “savedIndexNames.txt” from this same directory.
I've also learned that some hard Eclipse crashes as well as dubious plugin uninstalls (via directory deletions) migh completely bork the workspace, then Eclipse isn't even able to restart … again, the trick is to delete “workspace/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml” and restart with default workbench. (see also one of my older posts).
Tested with Eclipse <=3.0M4 … YMMV
Archive for the ‘windows’ tag
Periodically clean caches and history to avoid Eclipse 'rot'
Shy Java, silent Java, sad Java
Last, week I got to visit Web Services & XML Integration Forum in Paris. It was an interesting day and I’ll probably come back with some more info, but for now I’ll just talk about what really impressed me. There was a nice triagle of expo booths somewhere in the ‘North-East’ area of the Forum, three little companies you might’ve heard about : Microsoft, Sun and Borland.
The difference was striking. Microsoft is by far more prepared for this public event. They weren’t using presentation rooms, but instead conferencing right there in the booth all day long (with a lunch break of course). Although the presentation rooms were at least 4 times larger than the space they prepared (3 benchesx2m apx), I think they’ve got the best coverage at the Forum. They and Adobe, but Adobe was slightly off-topic (PDF is king at Adobe, and for a reason).
Instead of using a classic projector, casting large shadows every time they wanted to point something on the screen, MS people installed a large (plasma, I think) flat-screen in their booth. They were the only ones I saw with wireless microphones, which gave them a lot of freedom to walk, wave hands and hypnotize the audience. But wait, there’s more … The Microsoft guys were talking “agile enterprise and processes” and one of them said once “you can put any backend database here, say MySQL for instance”. No, there is no confusion with “MS SQL”, the guy standing next to me was as stunned as I was. And to complete a superb marketing image, they wear no suits, no ties – everybody was relaxed and smiling. The only glitch was that the latest rage among MS employees seems to be cloning Bill’s haircut. I mean wake up guys, you can cut your hair in differents lenghts an shapes, you know…
Just a few meters away, in the much smaller Borland booth, there was also a plasma display. However, no real presentations showing. Just a loop of images, logos of products and the word SPEED written in large, red letters. Um, ok. After 30 seconds I had to walk, it was incredibly boring.
No crowd was gathered at Sun’s booth, neither. Some LCDs were displaying what looked like a non-interactive Project Rave demo and some screenshots of a Windows’look’alike Linux distribution, their famous Sun Desktop blabla whatever. WHY were they showing this at a Web Services & XML Forum ? But, probably Sun’s intentions were to scare away the visitors so they could watch undisturbed Microsoft presentations. In that case, they succeded extremely well. Plus, their unique positioning gave them a perfect view of the presentations – or was it Microsoft which strategically placed their flat screen in Sun’s direction ? Hmmm, makes you wonder.
Anyway, to conclude, I watched two Microsoft speeches (one about their Web services strategy and one about Biztalk). It was fun, it was interesting, it was well explained. But it was not Java – and I am a Java developer. Should I be – hmm, ashamed or something ? For not watching instead : what, the bored faces of Sun staff ? Or : Jbuilder logo and words in big red letters ? Java has what we call an image problem. Some steps were made (the java.com site for instance) but there’s still a long way to go. It’s a matter of ‘packaging’ and might seem useless and frivolous. But how will Sun impose ‘friendlier’ development tools if the language itself still has a cold, silent, sad, geeky image, competing with .Net platform which has a much “sexier” look ?
SWT has an older brother … wx4j
wx4j is a Java wrapper around the *tried and tested* wxWindows widget framework. The main idea may be similar with one which gave birth to SWT : hide native widgets behing a [more or less] thin layer of Java. By “native” I mean widgets for Windows flavours, Linux/Unix with GTK+ or Motif, and MacOS as well. However I see some interesting differences :
+++ source code is available for native wxWindows, however not available for native part of SWT ?!?
+++ wx has considerably more C++ than Java. Some layers such as event loop are native to the OS thus (afaik) faster than SWT's.
— what about wxEmbedded ? would be nice to integrate also … SWT has already made some steps in this direction
— I find somehow questionable the sanity of the “native” approach, because we'll eventually end up writing small Java control layers manipulating native GUIs and native data sources (OTL anyone ?). But then again, this might be a valid approach.
As well as in SWT, there is some ["non-Javaic"] memory management needed such as destroying transient windows containers and deleting memory used by drawing contexts … Although the library is extremely young the doc is quite useful, even showing non-obvious things like how to deploy a wx4j app with webstart.