ilovepumpkin commented on issue #1498: URL: https://github.com/apache/cordova-android/issues/1498#issuecomment-1256837393
@breautek Thanks for your reply! As I said, I reproduced this issue in the Hello World application created by following the https://cordova.apache.org/docs/en/10.x/guide/cli/ - be more specific, I am using the command "cordova create hello com.example.hello HelloWorld", and in its index.js, there are only the following lines. ``` document.addEventListener('deviceready', onDeviceReady, false); function onDeviceReady() { // Cordova is now initialized. Have fun! console.log('Running cordova-' + cordova.platformId + '@' + cordova.version); document.getElementById('deviceready').classList.add('ready'); } ``` When you are talking about "reload the webview sometimes ...", do you mean clicking the Refresh button in Remote Debugger or use "window.location.reload()"? Based on my observation, clicking Refresh button is working fine (no OOM), but "window.location.reload()" does cause OOM. I uploaded the Hello World app here so you can give it a try (you will have to remove .zip from the file name) [app-debug.apk.zip](https://github.com/apache/cordova-android/files/9637720/app-debug.apk.zip) Regarding what you said about the web inspector, I totally agree and I did be aware of those and I am sure that I have disabled those settings when I reproducing this issue. Another thing I noticed that this memory increasing amount might be related to the resources loaded. For example, for the Hello World application, 30 times reload increases the memory from 1.8 MB to 8.3 MB. But for my product project, every reload will increase about 20 MB - because it loads many third party node modules. Is it possible that cordova cached all the resources loaded by webview, when I invoke "window.location.reload()", cordova didn't clear the old cache data and added new cache data, therefore, the memory is kept increasing? I don't have any evidence so far, just my guess. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
