×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Apr 2004
    Posts
    107

    Question Fastest method for file copy and saving

    I'm looking for the fastest method of saving and coping a big file (8.5 MB 53.000 lines).

    I use this procedure, that makes a backup copy before and then saves the list into a file. An that take 2 minutes. How could this be done faster? To copy this file with phone buildin explorer takes not so much time.

    Code:
    def save_wlan():
    	global wlan_name
    	wlan_name_backup = wlan_name[:-3]+"bak"
    	try:
    		shutil.copyfile(wlan_name,wlan_name_backup)
    	except:
    		pass
    	file = open(wlan_name,'w')
    	file.writelines(wlan_list)
    	file.close()

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Fastest method for file copy and saving

    I'm not sure if it's faster, but you might want to try the methods in this article.

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Fastest method for file copy and saving

    hi bogdan
    can you throw some light on how programatically the transfer in copying the files can be increased.
    thanks waiting for reply

  4. #4
    Regular Contributor
    Join Date
    Apr 2004
    Posts
    107

    Re: Fastest method for file copy and saving

    I tested the e32.file_copy method against the shoutil.copyfile method for some copying of 3 large files in telephone memory. The shoutil method is much slower, it needed 2 mins where the e32 method only needed 40 seconds for the same files.

Posting Permissions

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