Blackberry BrowserField2 extreemly slow loading times

630 views Asked by At

I am currently trying to load some pages with a BrowserField2 but the loading time takes way to long. Loading the same page in the OS Browser works fine (<5 sec) but loading it within my app takes >30 seconds. What could be the reason? Here is my code:

            BrowserFieldConfig config = new BrowserFieldConfig();
                config.setProperty(BrowserFieldConfig.NAVIGATION_MODE, BrowserFieldConfig.NAVIGATION_MODE_POINTER);
                config.setProperty(BrowserFieldConfig.JAVASCRIPT_ENABLED, Boolean.TRUE);
                browserField = new BrowserField(config);

BrowserFieldListener listener = new BrowserFieldListener() {

                    public void documentCreated(BrowserField browserField, ScriptEngine scriptEngine, Document document) throws Exception{
                        // Show a loadinganimation
                    }           

                    public void documentLoaded(BrowserField browserField, Document document) throws Exception{
                        try{
                            // Hide a loadingAnimation
                        }catch(IllegalStateException es){
                            es.printStackTrace();
                        }
                    }
                };

    browserField.addListener( listener );

I had the same problem before I implemented the BrowserFieldListener (and loading animation) so it has nothing to do with that. Have I missed something?

0

There are 0 answers