Using enum in eclipse [message #981857] |
Mon, 12 November 2012 13:59  |
Eclipse User |
|
|
|
Hi, I have a big enum class(classA) which has more than 2000 constants. And
this been used in a big switch statement.
The project took 40 seconds to run on my eclipse, but it only took 10 second on netbeans. If I change the enum to integer, the problem will gone.
I would like to understand why switch enum on eclipse take this long time.
Any thoughts? Thanks a lot.
|
|
|
|
Re: Using enum in eclipse [message #982258 is a reply to message #982061] |
Mon, 12 November 2012 21:35   |
Eclipse User |
|
|
|
Yes, she is one of my colleague.
Is there a method in Eclipse that I can specify the compiler to use? like javac?
The code is very big, but I can give you an example:
public Enum TempType(){
IDA,IDB,IDC...
}
TempType include more than 2300 enum items defined.
And in other class, there is the switch like:
public class TempTypeB(OtherType outerSwitch, TempType ttName){
switch(oterSwitch):
case aaa:
{
switch (ttName):
case IDA:
//do something;
break;
case IDB:
// do something
break;
...
}
...
}
}
The code is very straight forward, it is a double switch, the out side is other type, the inside is enum type. We try to understand why eclipse is much slower than netbeans.
Thanks.
|
|
|
|
|
Re: Using enum in eclipse [message #984061 is a reply to message #983603] |
Wed, 14 November 2012 06:14  |
Eclipse User |
|
|
|
On 14.11.2012 03:48, lan zhang wrote:
> I am not sure I should keep post here or may go to that bug report https://bugs.eclipse.org/bugs/show_bug.cgi?id=393934.
Please use bugzilla to discuss a bug.
Dani
>
> But thanks a lot to Stephan, it is really helped.
>
> Now, I try to run javac to build the jar file. I attached my ant build xml file. I think the compiler runs, but it didn't build the jar file. I am new to this whole stuff, any help with the ant build?
>
> Thanks.
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03539 seconds