Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
erbrecht
Posts: 3
Registered: ‎11-09-2010
My Device: Not Specified
Accepted Solution

Browser field2 renders extremely slowly

I am developing an application that exists mostly as a remote web app.  I am still using a few native controls.  I don't want to invoke the browser because I lose the ability to maintain control of the native application.  I used the guide here

 

http://docs.blackberry.com/en/developers/deliverables/17971/Display_HTML_from_a_web_page_in_a_browse...

 

to display the web content in a browser field.  It works, but it is extremely slow.  I can navigate the actual web site very quickly through the browser.  When I click  a link it takes about 1 second to retrieve and render the content.  When I use the application that calls a browser field to navigate the same site, it can take upwards of 10 seconds to render a page after I click a link.  It might not sound like much but that's a huge difference.  I can't deliver something like that to my users.  Is there something I'm missing that would speed this up, or something I'm doing wrong that's slowing it down?

 

Testing on:

9800 Torch

6.0.0.141

WiFi connection, haven't used 3G, no sim card

Blackberry JRE 6.0.0

BlackBerry Development Advisor
MSohm
Posts: 14,757
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Browser field2 renders extremely slowly

Does the BlackBerry Torch have any BlackBerry services enabled on it (BES or BIS)?  Have you cleared the browsers cache before using it for a time comparison?  Try appending ";interface=wifi" to the end of your URL.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Contributor
bcall_99
Posts: 5
Registered: ‎10-18-2010
My Device: Not Specified

Re: Browser field2 renders extremely slowly

I am having this issue too!

When I use the browserfield2 to show some html the first time, it takes around 30seconds to display it onto the screen.

Any attempts after that take about a second or 2.

 

Did you find a solution for your problem??:smileywink:

Regular Contributor
ManikandanP
Posts: 77
Registered: ‎09-19-2008
My Device: Blackberry 8320

Re: Browser field2 renders extremely slowly

Guys,

 

I have completed 2-3 projects using BrowserField2. Yes it is slow as you have explained when compare to normal browser.

 

Here are the few details from my experience,

 

1. Time to load HTML is proportional to number of images, JS, CSS and other resource files present in HTML page.

2. Each resource (CSS, JS, images etc) are downloaded individually i.e. each time connection is established to server to download them. (Mark - please correct me if I am wrong on this point)

3. We have kept resources at mobile client and mention its path in HTML content instead of server path. This reduces your load time.

 

Thanks,

 

 

New Contributor
bcall_99
Posts: 5
Registered: ‎10-18-2010
My Device: Not Specified

Re: Browser field2 renders extremely slowly

hi ManikandanP,

 

I know it is slower than normal browser but i was just trying to print <html>abc</html> and it still took 30 seconds.  I am not quite sure if that's normal or not.

 

Thanks

Regular Contributor
ManikandanP
Posts: 77
Registered: ‎09-19-2008
My Device: Blackberry 8320

Re: Browser field2 renders extremely slowly

Ohhh that should be fast... something wrong the way you have implemented.

 

Can you share more information? I will check tomorrow and let you know if I get clue on issue.

 

Thanks,

Mani

New Contributor
bcall_99
Posts: 5
Registered: ‎10-18-2010
My Device: Not Specified

Re: Browser field2 renders extremely slowly

Here is a quick snip of my code:

 

public class ReceiptScreen extends MainScreen

{

    public ReceiptScreen(String receipt) //receipt is the html

    {

        VerticalFieldManager fieldManagerMiddle = new VerticalFieldManager();

 

        BrowserField myBrowserField = new BrowserField(new MyBrowserFieldConfig());
        vfm.add(myBrowserField);
        myBrowserField.displayContent(receipt, "http://localhost");

 

        add(vfm);

    }

}

 

I have another class which push this screen onto display by doing:

synchronized(Application.getEventLock())
{    
    UiApplication.getUiApplication().pushScreen(new ReceiptScreen(receipt));
}

 

Please help.

The 30 seconds delay only happens when I restart the phone/simulator and run my app for the first time.  After that, it is back to normal and runs really fast.

 

Thanks!

 

New Contributor
bcall_99
Posts: 5
Registered: ‎10-18-2010
My Device: Not Specified

Re: Browser field2 renders extremely slowly

Nevermind, it was some other code blocking it from running.  Thanks for the help!

Regular Contributor
krishnan8727
Posts: 63
Registered: ‎10-06-2010
My Device: Not Specified

Re: Browser field2 renders extremely slowly

Can you please share the information which block the rendering with us it might be helpful to us please, because I also face the same issue in the of rendering delay

 

New Developer
Thiru
Posts: 5
Registered: ‎12-29-2009
My Device: 9530

Re: Browser field2 renders extremely slowly

Hi,

 

  I too having very slow in rendering content in browser field2 in blackberry torch 9800 device. Any one finds solution?