GC sticky parallel scan background released and application crash - android

When sending some data to the server, the method below increases,

I/art﹕ Background sticky concurrent mark sweep GC freed 45388(3MB) AllocSpace objects, 17(292KB) LOS objects, 14% free, 10MB/11MB, paused 20.543ms total 209.212ms
I/art﹕ Background partial concurrent mark sweep GC freed 66026(4MB) AllocSpace objects, 27(616KB) LOS objects, 28% free, 9MB/13MB, paused 2.454ms total 246.055ms
I/art﹕ Background sticky concurrent mark sweep GC freed 42923(3MB) AllocSpace objects, 14(236KB) LOS objects, 20% free, 11MB/13MB, paused 3.247ms total 143.983ms
W/art﹕ Suspending all threads took: 7.054ms

MyClass.Java

private static synchronized void saveToServer(final MyClass myclass) throws JSONException {
User currentUser = MainActivity.getUser();
HashMap<String, Object> params = new HashMap<String, Object>();
params.put("name", myclass.getname());
// …. other params.put(....)
try {
HttpClientUtils.postRequestWithCallback(SAVE_URL, params, SignatureType.SIG_SEC, new HttpClientUtils.CustomCallbackListener(){
@Override
public void onSuccess(JSONObject jsonObject) {
myclass.setSaved(true);
}
});
}catch (Exception e){
}
}
+4
source share

Source: https://habr.com/ru/post/1606821/


All Articles