Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15407] Android: Performance: String manipulation experiment

GitHub Issuen/a
TypeStory
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-10-29T23:32:38.000+0000
Affected Version/sRelease 3.2.0
Fix Version/s2013 Sprint 22, 2013 Sprint 22 API, Release 3.2.0
ComponentsAndroid
Labelsapi
ReporterHieu Pham
AssigneeHieu Pham
Created2013-10-07T20:13:42.000+0000
Updated2017-03-22T22:48:51.000+0000

Description

In production builds, we're still calling "Log.d(TAG, a + b) " in many places (300+), generating unnecessary strings. We need to conduct an experiment to see how much memory and performance boost we'll get by removing these strings.

Comments

  1. Hieu Pham 2013-10-29

    Experiment Results: 1. I created a native Android app printing Log.d(Tag, MSG) 20k times, 100x, then take the average. The average is ~220ms. This shows that the performance improvement is extremely negligible. 2. I then created a simple Titanium app, run it, and count how many logs we print. With one window, one button, and one view, we print 22 debug logs. This shows that the logs are not being used frequently. From these experiments, It is definitely not worth our efforts to optimize this process since we'll get nothing from it. Closing issue.
  2. Lee Morris 2017-03-22

    Closing ticket as fixed.

JSON Source