[jira] [Commented] (CB-12019) cordova-plugin-file : Performance issue between version 3.0.0 and 4.3.0
[ https://issues.apache.org/jira/browse/CB-12019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15682962#comment-15682962 ] Sebastien Chauffray commented on CB-12019: -- Hi Have you been able to watch this performance issue ? Thanks a lot Sebastien > cordova-plugin-file : Performance issue between version 3.0.0 and 4.3.0 > --- > > Key: CB-12019 > URL: https://issues.apache.org/jira/browse/CB-12019 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin File >Affects Versions: 3.5.0 > Environment: Tests done with Visual Studio 2015, cordova cli 6.3 > Materiel : Samsung A5 2016, Android 6.0.1 >Reporter: Sebastien Chauffray >Priority: Minor > Labels: performance > > Performance tests to compare cordova-plugin-file 3.0.0 to 4.3.0 > I've done 3 tests : > Test 1 : Create 1 000 files (about 4 000 characters each) in synchronous > mode. I wait the end of a file to create the next > Test 2 : Create 500 files (about 4 000 characters each) in asynchronous mode. > Don't wait to create all the file > Test 3 : Create a file by 400 appends of 4 000 caractères and read this file > (about 1.60 Mo) > I mesure each test and see very bad performance for version 4.3.0 of the > plugin... > You can see the result in the array : > Version 3.0.0 > Cycle 1Cycle 2 > Test 121s 975ms 22s 78ms > Test 24s 118ms 3s 761ms > Test 310s 317ms > Version 4.3.0 > Cycle 1Cycle 2 > Test 150s 341ms 51s 10ms > Test 28s 172ms 9s 230ms > Test 316s 484ms > if needed, i can discuss about the test detail -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12019) cordova-plugin-file : Performance issue between version 3.0.0 and 4.3.0
[ https://issues.apache.org/jira/browse/CB-12019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15591052#comment-15591052 ] Sebastien Chauffray commented on CB-12019: -- I'll try to describe the process we use, hope it could help. Do not hesitate to contact me if you need more informations or if you see something wrong... Info: Same code is used for both plugin versions. We use WinJS librairy to manage some stuff like Promise. ctrl.largeFileTemplate is a large stringify Json about 4 000 characters. Function 1 - Used to create a file : createFile: function (filePath, textContent) { var ctrl = this; return new WinJS.Promise( function (completeDispatch, errorDispatch, progressDispatch) { //Delete the file first ctrl.deleteFile(filePath).then( function (res) { //Create the file and write the content ctrl._dataDirectoryEntry.getFile(filePath, { create: true }, function (fileEntry) { fileEntry.createWriter(function (fileWriter) { fileWriter.onwriteend = function (evt) { completeDispatch(true); }; fileWriter.onerror = function (err) { //Some STUFF errorDispatch(err); }; fileWriter.write(textContent); }); }); }, function (err) { //Some STUFF errorDispatch(err); }); }); } Function 2 : Used to run some function recursively _recursively: function (array, fct, i) { var ctrl = this; i = i || 0; if (i < array.length) { return fct(array[i]).then(function () { return ctrl._recursively(array, fct, ++i); }); } else { return WinJS.Promise.wrap(); } } Main test function : Create files recursively createFilesSynchon: function () { var ctrl = this; var nbFiles = 1000; //Generate an array with integer from 1 to nbFiles var myarray = Array.apply(null, { length: nbFiles }).map(Number.call, Number); //use _recursively function to call the creation of one file ServicesT.MiSyncService._recursively(myarray, function (i) { //create the file var filepath = ServicesT.IOService.formatURL(ServicesT.IOService.getSubFolderDataPathIN() + '\\createFilesSynchon_' + i + '.json'); return ServicesT.IOService.createFile(filepath, ctrl.largeFileTemplate); }); } > cordova-plugin-file : Performance issue between version 3.0.0 and 4.3.0 > --- > > Key: CB-12019 > URL: https://issues.apache.org/jira/browse/CB-12019 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin File >Affects Versions: 3.5.0 > Environment: Tests done with Visual Studio 2015, cordova cli 6.3 > Materiel : Samsung A5 2016, Android 6.0.1 >Reporter: Sebastien Chauffray >Priority: Minor > Labels: performance > > Performance tests to compare cordova-plugin-file 3.0.0 to 4.3.0 > I've done 3 tests : > Test 1 : Create 1 000 files (about 4 000 characters each) in synchronous > mode. I wait the end of a file to create the next > Test 2 : Create 500 files (about 4 000 characters each) in asynchronous mode. > Don't wait to create all the file > Test 3 : Create a file by 400 appends of 4 000 caractères and read this file > (about 1.60 Mo) > I mesure each test and see very bad performance for version 4.3.0 of the > plugin... > You can see the result in the array : > Version 3.0.0 > Cycle 1Cycle 2 > Test 121s 975ms 22s 78ms > Test 24s 118ms 3s 761ms > Test 310s 317ms > Version 4.3.0 > Cycle 1Cycle 2 > Test 150s 341ms 51s 10ms > Test 28s 172ms 9s 230ms > Test 316s 484ms > if needed, i can discuss about the test detail -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CB-12019) cordova-plugin-file : Performance issue between version 3.0.0 and 4.3.0
[ https://issues.apache.org/jira/browse/CB-12019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15589674#comment-15589674 ] Joe Bowser commented on CB-12019: - [~schauffray] I don't use VS, so that actually wouldn't help. > cordova-plugin-file : Performance issue between version 3.0.0 and 4.3.0 > --- > > Key: CB-12019 > URL: https://issues.apache.org/jira/browse/CB-12019 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin File >Affects Versions: 3.5.0 > Environment: Tests done with Visual Studio 2015, cordova cli 6.3 > Materiel : Samsung A5 2016, Android 6.0.1 >Reporter: Sebastien Chauffray >Priority: Minor > Labels: performance > > Performance tests to compare cordova-plugin-file 3.0.0 to 4.3.0 > I've done 3 tests : > Test 1 : Create 1 000 files (about 4 000 characters each) in synchronous > mode. I wait the end of a file to create the next > Test 2 : Create 500 files (about 4 000 characters each) in asynchronous mode. > Don't wait to create all the file > Test 3 : Create a file by 400 appends of 4 000 caractères and read this file > (about 1.60 Mo) > I mesure each test and see very bad performance for version 4.3.0 of the > plugin... > You can see the result in the array : > Version 3.0.0 > Cycle 1Cycle 2 > Test 121s 975ms 22s 78ms > Test 24s 118ms 3s 761ms > Test 310s 317ms > Version 4.3.0 > Cycle 1Cycle 2 > Test 150s 341ms 51s 10ms > Test 28s 172ms 9s 230ms > Test 316s 484ms > if needed, i can discuss about the test detail -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12019) cordova-plugin-file : Performance issue between version 3.0.0 and 4.3.0
[ https://issues.apache.org/jira/browse/CB-12019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15588900#comment-15588900 ] Sebastien Chauffray commented on CB-12019: -- Sorry for my late answer... The permissions have been set to the application before the tests. The results are pretty the same every time I run the tests If needed, I can give the Visual Studio Solution Thks for your answer Sebstien > cordova-plugin-file : Performance issue between version 3.0.0 and 4.3.0 > --- > > Key: CB-12019 > URL: https://issues.apache.org/jira/browse/CB-12019 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin File >Affects Versions: 3.5.0 > Environment: Tests done with Visual Studio 2015, cordova cli 6.3 > Materiel : Samsung A5 2016, Android 6.0.1 >Reporter: Sebastien Chauffray >Priority: Minor > Labels: performance > > Performance tests to compare cordova-plugin-file 3.0.0 to 4.3.0 > I've done 3 tests : > Test 1 : Create 1 000 files (about 4 000 characters each) in synchronous > mode. I wait the end of a file to create the next > Test 2 : Create 500 files (about 4 000 characters each) in asynchronous mode. > Don't wait to create all the file > Test 3 : Create a file by 400 appends of 4 000 caractères and read this file > (about 1.60 Mo) > I mesure each test and see very bad performance for version 4.3.0 of the > plugin... > You can see the result in the array : > Version 3.0.0 > Cycle 1Cycle 2 > Test 121s 975ms 22s 78ms > Test 24s 118ms 3s 761ms > Test 310s 317ms > Version 4.3.0 > Cycle 1Cycle 2 > Test 150s 341ms 51s 10ms > Test 28s 172ms 9s 230ms > Test 316s 484ms > if needed, i can discuss about the test detail -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-12019) cordova-plugin-file : Performance issue between version 3.0.0 and 4.3.0
[ https://issues.apache.org/jira/browse/CB-12019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15576642#comment-15576642 ] Joe Bowser commented on CB-12019: - Could the slow down be the permissions being asked? What happens on concurrent tests? > cordova-plugin-file : Performance issue between version 3.0.0 and 4.3.0 > --- > > Key: CB-12019 > URL: https://issues.apache.org/jira/browse/CB-12019 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin File >Affects Versions: 3.5.0 > Environment: Tests done with Visual Studio 2015, cordova cli 6.3 > Materiel : Samsung A5 2016, Android 6.0.1 >Reporter: Sebastien Chauffray > Labels: performance > > Performance tests to compare cordova-plugin-file 3.0.0 to 4.3.0 > I've done 3 tests : > Test 1 : Create 1 000 files (about 4 000 characters each) in synchronous > mode. I wait the end of a file to create the next > Test 2 : Create 500 files (about 4 000 characters each) in asynchronous mode. > Don't wait to create all the file > Test 3 : Create a file by 400 appends of 4 000 caractères and read this file > (about 1.60 Mo) > I mesure each test and see very bad performance for version 4.3.0 of the > plugin... > You can see the result in the array : > Version 3.0.0 > Cycle 1Cycle 2 > Test 121s 975ms 22s 78ms > Test 24s 118ms 3s 761ms > Test 310s 317ms > Version 4.3.0 > Cycle 1Cycle 2 > Test 150s 341ms 51s 10ms > Test 28s 172ms 9s 230ms > Test 316s 484ms > if needed, i can discuss about the test detail -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org