We have observed high memory consumption by the applications when run on devices like iPhone (4) and Andorid (Samsung Galaxy).
Even a simplest of the applications (code below) takes upwards of 15 mb memory on the device. The way we measured it was using a system utility app that shows free memory in the device. Free memory fell by 10 mb as soon as the browser (safari) was started. It fell further 15 mb as soon as the app started.
Is there something wrong in the app/browser setting? This kind of memory consumption is crashing our application which has things like carousels and lists. This behavior is observed even with the app that was packaged with jsbuilder.
Any pointers would be highly appreciated
Code:
<html>
<head>
<meta charset="UTF-8" />
<title>My Panel</title>
<link rel="stylesheet" type="text/css" media="screen, projection, print" href="../../resources/css/sencha-touch.css">
<link rel="stylesheet" type="text/css" media="screen, projection, print" href="app.css">
<script src="../../sencha-touch-debug.js" type="text/javascript" charset="utf-8"></script>
<script src="app/app.js" type="text/javascript" charset="utf-8"></script>
</head>
<body/>
</body>
</html>
Code:
Ext.Loader.setConfig({
enabled : true,
paths : {
'MyApp' : 'app',
}
});
Ext.setup({
viewport : {
autoMaximize : ((Ext.os.is('iOS'))&& (location.href.indexOf('.app') != -1)) ? false : true
},
onReady : function() {
Ext.create('Ext.app.Application', {
name : 'MyApp',
fullscreen : true,
appFolder : 'app',
launch : function() {
var mypanel = Ext.create('Ext.Panel', {
html:'My Panel'
});
Ext.Viewport.add(mypanel);
}
});
}
});