GCJ 3.2 awfully slow ResourceBundle.getBundle()

óÃÒÇÃÊ óÁÍÏÈÏÄËÉÎ serge@zolshar.ru
Thu Sep 11 14:32:00 GMT 2003


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


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /