Skip to content
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

Merged
merged 4 commits into from
May 14, 2019

Conversation

sgtcoolguy
Copy link
Contributor

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.

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
@build build added this to the 8.1.0 milestone Apr 30, 2019
@build build requested a review from a team April 30, 2019 20:27
@build
Copy link
Contributor

build commented Apr 30, 2019

Messages
📖 👍 Hey!, You deleted more code than you added. That's awesome!
📖

✅ All tests are passing
Nice one! All 1792 tests are passing.
(There are 233 tests skipped)

Generated by 🚫 dangerJS against 9d69335

@sgtcoolguy
Copy link
Contributor Author

@mukherjee2 I think this should be a candidate for 8.0.1/8.0.2

@keerthi1032
Copy link
Contributor

@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
instrumentswithoutfix_testapp_8_0.trace.zip
Instrumentswithfix_testapp.trace.zip
Screen Shot 2019-05-08 at 1 16 01 PM
Screen Shot 2019-05-08 at 1 02 11 PM

Copy link
Contributor

@ssjsamir ssjsamir left a 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

@sgtcoolguy sgtcoolguy merged commit 29a75ae into tidev:master May 14, 2019
@sgtcoolguy sgtcoolguy deleted the TIMOB-26967 branch May 14, 2019 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants