I/O with File plugin is slow The Next CEO of Stack OverflowLocal storage using OpenUI5 and Apache CordovaUpdate cordova plugins in one commandWhere is the location of file created by Cordova File Plugin?Phonegap/Cordova - Move audio file to the created directoryphone gap plugin in cordova projectAdd non Cordova-Plugin dependency to Cordova PluginPhoneGap Cordova plugin google maps - Plugin not definedWhy Cordova vibration plugin is not working?Cordova Status Bar Plugin hides the input when the keyboard appearsCordova plugin camera is working fine in developer app but not working after build the apk

Does the Brexit deal have to be agreed by both Houses?

How long to clear the 'suck zone' of a turbofan after start is initiated?

Customer Requests (Sometimes) Drive Me Bonkers!

If the heap is initialized for security, then why is the stack uninitialized?

The King's new dress

Can the Reverse Gravity spell affect the Meteor Swarm spell?

Implement the Thanos sorting algorithm

Anatomically Correct Mesopelagic Aves

Go Pregnant or Go Home

Should I tutor a student who I know has cheated on their homework?

How do we know the LHC results are robust?

Grabbing quick drinks

When Does an Atlas Uniquely Define a Manifold?

Can a single photon have an energy density?

Anatomically Correct Strange Women In Ponds Distributing Swords

How to make a software documentation "officially" citable?

How do I go from 300 unfinished/half written blog posts, to published posts?

Why did we only see the N-1 starfighters in one film?

Are there languages with no euphemisms?

Was a professor correct to chastise me for writing "Prof. X" rather than "Professor X"?

Trouble understanding the speech of overseas colleagues

How to start emacs in "nothing" mode (`fundamental-mode`)

Why doesn't a table tennis ball float on the surface? How do we calculate buoyancy here?

Only print output after finding pattern



I/O with File plugin is slow



The Next CEO of Stack OverflowLocal storage using OpenUI5 and Apache CordovaUpdate cordova plugins in one commandWhere is the location of file created by Cordova File Plugin?Phonegap/Cordova - Move audio file to the created directoryphone gap plugin in cordova projectAdd non Cordova-Plugin dependency to Cordova PluginPhoneGap Cordova plugin google maps - Plugin not definedWhy Cordova vibration plugin is not working?Cordova Status Bar Plugin hides the input when the keyboard appearsCordova plugin camera is working fine in developer app but not working after build the apk










0















I am currently working on an application that will receive and store several photos and videos in the local file system. (On average 40 photos and 10 videos per user)



To do this, I download the media from the server and then write it to the phone.



I feel like that the writing process is rather slow and I come to explain my problem to you to know if it is indeed an anomaly or if it is a correct time and that it is cordova or simply Android limitations.



To test the performance I created an empty cordova project so as not to distort the values because of the framework or other task that the application uses at the same time.



Here is the function that will write in the smartphone :



function write(blobObject) 
t0 = performance.now();
var path = cordova.file.externalApplicationStorageDirectory;
window.resolveLocalFileSystemURL(path, function (directoryEntry)
directoryEntry.getFile('toto.iso', create: true, exclusive: false , function (fileEntry)
fileEntry.createWriter(function (fileWriter)
var writed_size = 0;
var chunk_size = 0.25*1024*1024;

var writeChunk = () =>
fileWriter.onwrite = function()
if (writed_size < blobObject.size)
writeChunk();

else
t1 = performance.now();

;

if (writed_size)
fileWriter.seek(fileWriter.length);


var seeked_data = blobObject.slice(writed_size, writed_size + Math.min(chunk_size, blobObject.size - writed_size));

fileWriter.write(seeked_data);
writed_size += Math.min(chunk_size, blobObject.size - writed_size);


writeChunk();
);
, function() alert('error'););
);



Writing a 5MB file takes an average of 2385ms



Writing a 10MB file takes an average of 4774ms



Writing a 50MB file takes an average of 21867ms



Do you think it's my way of doing things that's wrong and if so, why?



Or as I think it's just limitations due to Cordova?



I'm testing from a Honor 6X.



Thank you very much for your help.










share|improve this question


























    0















    I am currently working on an application that will receive and store several photos and videos in the local file system. (On average 40 photos and 10 videos per user)



    To do this, I download the media from the server and then write it to the phone.



    I feel like that the writing process is rather slow and I come to explain my problem to you to know if it is indeed an anomaly or if it is a correct time and that it is cordova or simply Android limitations.



    To test the performance I created an empty cordova project so as not to distort the values because of the framework or other task that the application uses at the same time.



    Here is the function that will write in the smartphone :



    function write(blobObject) 
    t0 = performance.now();
    var path = cordova.file.externalApplicationStorageDirectory;
    window.resolveLocalFileSystemURL(path, function (directoryEntry)
    directoryEntry.getFile('toto.iso', create: true, exclusive: false , function (fileEntry)
    fileEntry.createWriter(function (fileWriter)
    var writed_size = 0;
    var chunk_size = 0.25*1024*1024;

    var writeChunk = () =>
    fileWriter.onwrite = function()
    if (writed_size < blobObject.size)
    writeChunk();

    else
    t1 = performance.now();

    ;

    if (writed_size)
    fileWriter.seek(fileWriter.length);


    var seeked_data = blobObject.slice(writed_size, writed_size + Math.min(chunk_size, blobObject.size - writed_size));

    fileWriter.write(seeked_data);
    writed_size += Math.min(chunk_size, blobObject.size - writed_size);


    writeChunk();
    );
    , function() alert('error'););
    );



    Writing a 5MB file takes an average of 2385ms



    Writing a 10MB file takes an average of 4774ms



    Writing a 50MB file takes an average of 21867ms



    Do you think it's my way of doing things that's wrong and if so, why?



    Or as I think it's just limitations due to Cordova?



    I'm testing from a Honor 6X.



    Thank you very much for your help.










    share|improve this question
























      0












      0








      0








      I am currently working on an application that will receive and store several photos and videos in the local file system. (On average 40 photos and 10 videos per user)



      To do this, I download the media from the server and then write it to the phone.



      I feel like that the writing process is rather slow and I come to explain my problem to you to know if it is indeed an anomaly or if it is a correct time and that it is cordova or simply Android limitations.



      To test the performance I created an empty cordova project so as not to distort the values because of the framework or other task that the application uses at the same time.



      Here is the function that will write in the smartphone :



      function write(blobObject) 
      t0 = performance.now();
      var path = cordova.file.externalApplicationStorageDirectory;
      window.resolveLocalFileSystemURL(path, function (directoryEntry)
      directoryEntry.getFile('toto.iso', create: true, exclusive: false , function (fileEntry)
      fileEntry.createWriter(function (fileWriter)
      var writed_size = 0;
      var chunk_size = 0.25*1024*1024;

      var writeChunk = () =>
      fileWriter.onwrite = function()
      if (writed_size < blobObject.size)
      writeChunk();

      else
      t1 = performance.now();

      ;

      if (writed_size)
      fileWriter.seek(fileWriter.length);


      var seeked_data = blobObject.slice(writed_size, writed_size + Math.min(chunk_size, blobObject.size - writed_size));

      fileWriter.write(seeked_data);
      writed_size += Math.min(chunk_size, blobObject.size - writed_size);


      writeChunk();
      );
      , function() alert('error'););
      );



      Writing a 5MB file takes an average of 2385ms



      Writing a 10MB file takes an average of 4774ms



      Writing a 50MB file takes an average of 21867ms



      Do you think it's my way of doing things that's wrong and if so, why?



      Or as I think it's just limitations due to Cordova?



      I'm testing from a Honor 6X.



      Thank you very much for your help.










      share|improve this question














      I am currently working on an application that will receive and store several photos and videos in the local file system. (On average 40 photos and 10 videos per user)



      To do this, I download the media from the server and then write it to the phone.



      I feel like that the writing process is rather slow and I come to explain my problem to you to know if it is indeed an anomaly or if it is a correct time and that it is cordova or simply Android limitations.



      To test the performance I created an empty cordova project so as not to distort the values because of the framework or other task that the application uses at the same time.



      Here is the function that will write in the smartphone :



      function write(blobObject) 
      t0 = performance.now();
      var path = cordova.file.externalApplicationStorageDirectory;
      window.resolveLocalFileSystemURL(path, function (directoryEntry)
      directoryEntry.getFile('toto.iso', create: true, exclusive: false , function (fileEntry)
      fileEntry.createWriter(function (fileWriter)
      var writed_size = 0;
      var chunk_size = 0.25*1024*1024;

      var writeChunk = () =>
      fileWriter.onwrite = function()
      if (writed_size < blobObject.size)
      writeChunk();

      else
      t1 = performance.now();

      ;

      if (writed_size)
      fileWriter.seek(fileWriter.length);


      var seeked_data = blobObject.slice(writed_size, writed_size + Math.min(chunk_size, blobObject.size - writed_size));

      fileWriter.write(seeked_data);
      writed_size += Math.min(chunk_size, blobObject.size - writed_size);


      writeChunk();
      );
      , function() alert('error'););
      );



      Writing a 5MB file takes an average of 2385ms



      Writing a 10MB file takes an average of 4774ms



      Writing a 50MB file takes an average of 21867ms



      Do you think it's my way of doing things that's wrong and if so, why?



      Or as I think it's just limitations due to Cordova?



      I'm testing from a Honor 6X.



      Thank you very much for your help.







      cordova cordova-plugins phonegap-plugins phonegap






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 21 at 16:40









      Enzo BLANCHONEnzo BLANCHON

      731317




      731317






















          0






          active

          oldest

          votes












          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55285305%2fi-o-with-file-plugin-is-slow%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55285305%2fi-o-with-file-plugin-is-slow%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현