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

Web and WebWorks Development

Reply
Highlighted
New Contributor
Posts: 9
Registered: ‎06-10-2011
My Device: Bold 9900
My Carrier: O2 UK
Accepted Solution

Focus navigation mode too slow

Hello -

 

I've been playing around with a Webworks application utilizing focus navigation mode with approx 10 HTML P elements, each with a x-blackberry-focusable="true" attribute. There is no Javascript, and only a p:hover CSS rule to change the colour of the P elements as they focus and blur.

 

Unfortunately the scrolling lag inherent in the OS5, 6, 7 simulators and devices is much more noticeable than the equivalent action in a Java-based app. All the app is doing is changing the colour of the P element text in response to the touchpad, but it feels laggy and sluggish compared the snappy native apps.

 

I've eagerly followed Webworks since it was called Widgets, hoping one day to be able to utilize web development across different platforms, but I can't really imagine any client putting up with the sluggishness of a Webworks scrolling list and therefore will have to look at other development avenues.

 

Has anyone else experienced similar issues? I searched the forum and there are many posts about the JS/UI thread deadlock but none about the general sluggish feel of focus-based Webworks apps.

 

Balazs

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Focus navigation mode too slow

Yes, this is a known issue.. it has been scheduled to be fixed.  The fix is moving more of our navigation code down into JavaScript where it will run faster than Java.

 

The work is underway and you can see it on the roadmap:

 

https://github.com/blackberry/WebWorks/issues/milestones

 

We were trying to get these changes completed in time for DevCon but with all of the memory fixes we had to bump it into a follow up release

 

There is also a highly experimental branch in my github repo where (if you're up to it) you can try out some of the prototype changes.  From my experimentation, this makes scrolling as fast as native on BB6 and BB7 devices.

 

https://github.com/tneil/WebWorks/tree/navmode/navmodehttps://github.com/tneil/WebWorks/tree/navmode/navmode

 

The code in my Repo is HIGHLY experimental and isn't meant for mainsteam use.  But you can check it out so you can see how much of an improvement is made.

 

 

We know it's a priority and we are working on it.

 

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
Posts: 9
Registered: ‎06-10-2011
My Device: Bold 9900
My Carrier: O2 UK

Re: Focus navigation mode too slow

Hi Tim -

 

Thanks, that's fantastic news. We will keep Webworks in the loop for Blackberry development in that case. Do you have a date or an estimated forecast for when the new Javascript UI handling will be folded into a stable release of Webworks?

 

Balazs

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Focus navigation mode too slow

I don't really have a date yet for the updates.. everyone has been heads down on the v2.2 release coming up at DevCon.

 

I'm "guessing" we're likely looking at about a month or two.. it's really hard to say depending on how many snags we run into.  It's a fairly complicated piece of code.  We'll have people starting to work on it full time in a few days from now.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
Posts: 8
Registered: ‎01-20-2012
My Device: Bold 9780
My Carrier: Tigo

Re: Focus navigation mode too slow

I'm not thread jacking, but simply adding my comments.  I've put together a very simple app with bbui.js (great framework, nice and lite) and I find that the focus based navigation is slow.  Basically, the user interface experiences latency while moving around with the trackpad.  If I speed up movement on the trackpad then I can't control or predict where the focus will land, invariably skipping the desired control and moving to the next.  Are there any suggestions, or best practices to try and improve this behaviour?  I've packaged the app with WebWorks SDK 2.3.1.5.

Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: Focus navigation mode too slow

I second that..

Nuno
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Focus navigation mode too slow

Are there specific bbUI controls that you are finding slow? The image list and inbox list seem to scroll pretty well.. But i've seen delays in the text arrow list that I haven't been able to track down.  In theory it should be the same as the other lists, but it seems to take longer.. I'm wondering if it is some kind of event propagation slowing things down.  I'll have to track the events through web inspector.

 

Right now I'm concentrating on having a set of BB10 controls ready in bbUI for BB10Jam 

 

Can you also post the OS versions that you're testing with? 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: Focus navigation mode too slow

Hi Tim,

Yes I'm using text arrow list, and its pretty sluggish even with just a few items. OS7 here.

 

PS - not directly related but, is it a known bug that bbui.js doesnt loose the focus on elements when screens change? If I click my trackpad two times in a row, the screen changes twice like if I was still clicking the item on the previous screen. Hope this is clear enough...

 

Nuno
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Focus navigation mode too slow

Hmm didn't know about that click one.  Can you log an issue on github for it.

 

Does it happen when clicking twice on an event that does a pushScreen? I'm wondering if it's triggering twice before the old screen is removed from the dom 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: Focus navigation mode too slow

It's not about the speed. I can wait 5minutes until the 2nd click, the behaviour is the same, it seems the focus remains on the other one.

Same thing happens If i remove an element which has focus. If I click without moving the trackpad, it still acts like the element exists.

Nuno