This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
GCJ 3.2 awfully slow ResourceBundle.getBundle()
- From: Сергей Самоходкин <serge at zolshar dot ru>
- To: java at gcc dot gnu dot org
- Date: Thu, 11 Sep 2003 18:31:44 +0400
- Subject: GCJ 3.2 awfully slow ResourceBundle.getBundle()
- Organization: Gold Globe Electronics JSC
- Reply-to: Сергей Самоходкин <serge at zolshar dot ru>
Hello All,
$ gcj --version
gcj.exe (GCC) 3.2 (mingw special 20020817-1)
The single call:
ResourceBundle.getBundle("gnu.java.locale.Calendar",lc);
takes about 1 second.
The program:
============================================================
import java.util.*;
public class RBTest{
private static long t;
static void initClock(){
t=System.currentTimeMillis();
}
static void clock(String msg){
long t1=System.currentTimeMillis();
System.out.println(msg+(t1-t));
initClock();
}
public static void main(String[] args) throws Exception{
System.out.println("Hello!");
initClock();
ResourceBundle rs=ResourceBundle.getBundle("gnu.java.locale.Calendar");
clock("ResourceBundle.getBundle(...): ");
rs=ResourceBundle.getBundle("gnu.java.locale.Calendar");
clock("ResourceBundle.getBundle(...): ");
rs=ResourceBundle.getBundle("gnu.java.locale.Calendar");
clock("ResourceBundle.getBundle(...): ");
rs=ResourceBundle.getBundle("gnu.java.locale.Calendar");
clock("ResourceBundle.getBundle(...): ");
System.out.println("Bye!");
}
private static Class c1 = gnu.java.locale.Calendar.class;
}
============================================================
output:
============================================================
Hello!
ResourceBundle.getBundle(...): 1150
ResourceBundle.getBundle(...): 880
ResourceBundle.getBundle(...): 940
ResourceBundle.getBundle(...): 880
Bye!
--
Best regards,
Sergey Samokhodkin mailto:serge@zolshar.ru