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
Contributor
jaywhy13
Posts: 31
Registered: ‎11-14-2012
My Device: Blackberry 9780
My Carrier: Digicel

Re: TCP/WAP on EDGE extremely SLOW

Ok, I did some tests in the night but they seemed to be pretty good... I'll try again near midday to see what's happening. Here are the results...

[II] [TCP Cellular, 722B] Overall: 495
Connection: 0
Response: 477
Data: 1
Unzip: 17
[II] [TCP Cellular, 722B] Overall: 430
Connection: 0
Response: 428
Data: 1
Unzip: 1
[II] Using TCP Cellular for this request
[II] [TCP Cellular, 13746B] Overall: 1117
Connection: 0
Response: 415
Data: 1
Unzip: 0
[II] [TCP Cellular, 13923B] Overall: 1268
Connection: 0
Response: 550
Data: 0
Unzip: 0
[II] [TCP Cellular, 14088B] Overall: 1331
Connection: 0
Response: 585
Data: 1
Unzip: 0
[II] [TCP Cellular, 771B] Overall: 464
Connection: 0
Response: 462
Data: 1
Unzip: 1
[II] [TCP Cellular, 1020B] Overall: 429
Connection: 0
Response: 427
Data: 0
Unzip: 2
[II] [TCP Cellular, 767B] Overall: 605
Connection: 0
Response: 603
Data: 0
Unzip: 2
[II] [TCP Cellular, 12007B] Overall: 1186
Connection: 0
Response: 504
Data: 1
Unzip: 0
[II] [TCP Cellular, 358B] Overall: 594
Connection: 0
Response: 593
Data: 0
Unzip: 1
[II] [TCP Cellular, 12384B] Overall: 1304
Connection: 0
Response: 501
Data: 0
Unzip: 0
[II] [TCP Cellular, 715B] Overall: 1747
Connection: 0
Response: 1741
Data: 2
Unzip: 4
[II] [TCP Cellular, 14295B] Overall: 2849
Connection: 0
Response: 2770
Data: 1
Unzip: 0
[II] [TCP Cellular, 819B] Overall: 480
Connection: 0
Response: 478
Data: 1
Unzip: 1
[II] [TCP Cellular, 714B] Overall: 432
Connection: 0
Response: 410
Data: 1
Unzip: 20
[II] [TCP Cellular, 12089B] Overall: 1206
Connection: 0
Response: 566
Data: 1
Unzip: 0
[II] [TCP Cellular, 315B] Overall: 413
Connection: 0
Response: 411
Data: 1
Unzip: 1
[II] [TCP Cellular, 1089B] Overall: 436
Connection: 0
Response: 434
Data: 1
Unzip: 1

Please use plain text.
Contributor
jaywhy13
Posts: 31
Registered: ‎11-14-2012
My Device: Blackberry 9780
My Carrier: Digicel

Re: TCP/WAP on EDGE extremely SLOW

Just coming back here to talk about somthing I overlooked.. this line actually takes up to 1000ms to run sometimes.. ConnectionDescriptor connectionDescriptor = factory.getConnection(url); 

Is there anything that can be done to optimize that?

 

Please use plain text.
Contributor
jaywhy13
Posts: 31
Registered: ‎11-14-2012
My Device: Blackberry 9780
My Carrier: Digicel

Re: TCP/WAP on EDGE extremely SLOW

Oh wow... it actually takes longer sometimes... I just got a whopping 39 seconds! All I'm doing now is this...

public ConnectionFactory getConnectionFactory() {
ConnectionFactory factory = new ConnectionFactory();
factory.setPreferredTransportTypes(transportOrder);
factory.setTimeLimit(1500);
return factory;
}

 

My class implements CoverageStatusListener but I'm not sure how to add my class as a listener. 

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: TCP/WAP on EDGE extremely SLOW

I believe ConnectionFactory will attempt to connect via the mechanisms that you have told it too every time.  Perhaps you could actually only go through that process once, then in subsequent connections, prioritize the connection method that worked last time.  This will save ConnectionFactory retesting the other methods that failed previously. 

 

Say you tell it to try WiFi, then WAP, then Direct and it connects via Direct.  Next time you could tell it to try Direct, then WiFi, then WAP. 

 

The other thing is that for https connections, there is some handshaking involved in the connection establishment, that I believe ConnectionFactory actually does for you.  This will take time. 

 

Anyway,k try the the re-ordering and see if this saves time on subsequent connections. 

Please use plain text.