×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    1

    Slow setPreferencesKey

    Hello,
    I'm developing an application in WRT and I have a problem.

    This small app only saves text in the phone database (Preferences).

    In N5800 with 20.2.010 firmware, it takes:
    Writing 17 ms.
    Reading 15 ms.
    Erasing 16 ms.

    Now, in the same phone, but 51.2.007 firmware, process times are increased incredibly.
    Writing 106835 ms.
    Reading 15 ms.
    Erasing 107363 ms.

    and on an N5800, with 40.0.005 firmware:
    Writing 17 ms
    Reading 15 ms
    Erasing 98261 ms

    I also tried with RDA, and process times are similar to what's stated above for 40.0.005 and 51.2.007

    In short, the newer the firmware is, the longer it takes to complete the process.

    What do you think that's failing?

    I include the code I used to perform this testing.

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    	
    <html xmlns="http://www.w3.org/1999/xhtml">
    	<head>
    		<title>Basic Symbian Web Runtime Widget</title>
    		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    	</head>
    	<body onload="init();">
    	</body>
    </html>
    Javascript:
    Code:
    function init(){
    	D = new Date();
    	tiempoInit = D.getTime();
    	for (i=0; i < 100 ; i ++){
    		saveRecord("R"+i,"Lorem Ipsum is simply dummy text.")
    	} 
    	D = new Date();
    	tiempoFin  = D.getTime() - tiempoInit;
    	
    	alert("Writing :" + tiempoFin );
    	D = new Date();
    	tiempoInit = D.getTime();
    
    	for (i=0; i < 100 ; i ++){
    		readRecord("R"+i,null);
    	} 
    
    	D = new Date();
    	tiempoFin  = D.getTime() - tiempoInit;
    	alert("Reading :" + tiempoFin );
    	
    	D = new Date();
    	tiempoInit = D.getTime();
    
    	for (i=0; i < 100 ; i ++){
    		saveRecord("R"+i,null)
    	} 
    
    	D = new Date();
    	tiempoFin  = D.getTime() - tiempoInit;
    	alert("Erasing :" + tiempoFin );
    	
    }
    
    
    
    function saveRecord(recId, data){
    	try {
    		return widget.setPreferenceForKey(data, recId);
    	}catch(e){
    		console.debug(e);
    	}
    }
    
    function readRecord(recId){
    	try {
    		return widget.preferenceForKey(recId);
    	}catch(e){
    		return null;
    	}
    }

  2. #2
    Super Contributor
    Join Date
    May 2008
    Location
    Helsinki, Finland
    Posts
    1,100

    Re: Slow setPreferencesKey

    Hi there, camarosc!

    You have done some extensive studies on this, I must admit. Good work!

    I am sure this is something to look into. I will report this on and let's see the feedback.

    I will post here when I have received something.

    Best,
    Marko
    [FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
    Technical Support
    +358 40 8019330
    [email]marko.lumivuori@nokia.com[/email][/I][/FONT]

  3. #3
    Nokia Developer Moderator
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    4,538

    Re: Slow setPreferencesKey

    I have deleted your other thread. Please avoid multiposting.
    @Marko: One of your post from that thread too had to be deleted to keep it hanging..
    Thanks!

  4. #4
    Super Contributor
    Join Date
    May 2008
    Location
    Helsinki, Finland
    Posts
    1,100

    Re: Slow setPreferencesKey

    @Neil,

    No problem <grin> =)

    Party on,
    Marko
    [FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
    Technical Support
    +358 40 8019330
    [email]marko.lumivuori@nokia.com[/email][/I][/FONT]

  5. #5
    Nokia Developer Moderator
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    4,538

    Re: Slow setPreferencesKey

    Thanks Kiran for deleting my double post, did not notice till now that it was double posted...temporary network problem caused it

Similar Threads

  1. 6300 Slow?
    By OppoRTuneS in forum General Development Questions
    Replies: 2
    Last Post: 2008-02-15, 21:48
  2. Very Slow..
    By mayankkedia in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 8
    Last Post: 2006-11-29, 08:25
  3. slow slow Series_60_MIDP_Concept_SDK_BETA_0_3_1 emmulator
    By dd_plus in forum Mobile Java Tools & SDKs
    Replies: 5
    Last Post: 2004-08-09, 10:33

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×