-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ios): disable log server when not being used #10869
Conversation
Previously we'd use DISABLE_TI_LOG_SERVER pre-processor define to turn it off. Now that TiLogServer is in TitaniumKit we need to use that define to toggle a TiSharedConfig boolean flag. When off, avoid starting TiLogServer or forwarding logs to it. Fixes TIMOB-26967
@mukherjee2 I think this should be a candidate for 8.0.1/8.0.2 |
@sgtcoolguy Im seeing the below graphs with the fix and without fix. I don’t see much difference between them. Memory drops is minimal. Im not sure whether is it ok .can you please confirm whether it is ok to mark this as resolved .Also included instrument log for reference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FR Passed: Memory leak seems to be contained using the following test case.
var win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
var btn = Ti.UI.createButton({
title: 'Trigger'
});
var count = 0;
btn.addEventListener('click', function () {
var url = 'https://www.mediawiki.org/w/api.php?action=help&recursivesubmodules=1';
var xhr = Ti.Network.createHTTPClient({
onload: function (e) {
Ti.API.debug(this.responseText);
// alert('success');
console.log('Success');
count++;
// $.num.text = count + ' calls';
},
onerror: function (e) {
Ti.API.debug(e.error);
console.log('error');
// alert('error');
},
timeout: 5000
});
xhr.open('GET', url);
xhr.send();
});
win.add(btn);
win.open();
Test Environment
iPhone 6S plus (12.2 Sim)
APPC CLI: 7.0.11-1
Operating System Name: Mac OS Mojave
Operating System Version: 10.14.2
Node.js Version: 8.9.1
Xcode 10.2.1
JIRA: https://jira.appcelerator.org/browse/TIMOB-26967
Description:
Previously we'd use DISABLE_TI_LOG_SERVER pre-processor define to turn it off.
Now that TiLogServer is in TitaniumKit we need to use that define to toggle a TiSharedConfig boolean flag.
When off, avoid starting TiLogServer or forwarding logs to it.