Closed
Bug 517549
Opened 15 years ago
Closed 15 years ago
TISGetInputSourceProperty is 12.3% of my startup path
Categories
(Core :: Widget: Cocoa, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a1
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
status1.9.1 | --- | .4-fixed |
People
(Reporter: joelr, Assigned: masayuki)
References
Details
(Whiteboard: [ts])
Attachments
(2 files, 1 obsolete file)
(deleted),
patch
|
jaas
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
jaas
:
review+
jaas
:
approval1.9.2+
dveditz
:
approval1.9.1.4+
|
Details | Diff | Splinter Review |
Can the input bits in the nsChildView constructor be backgrounded in another thread or kicked down the road?
0.0% 12.4% XUL nsView::LoadWidget(nsID const&)
0.0% 12.4% XUL CallCreateInstance(nsID const&, nsISupports*, nsID const&, void**)
0.0% 12.4% XUL nsComponentManagerImpl::CreateInstance(nsID const&, nsISupports*, nsID const&, void**)
0.0% 12.4% XUL nsChildViewConstructor(nsISupports*, nsID const&, void**)
0.0% 12.4% XUL nsChildView::nsChildView()
0.0% 12.3% HIToolbox TISGetInputSourceProperty
0.0% 12.3% HIToolbox TSMGetInputSourceProperty
0.0% 12.3% HIToolbox islGetInputSourceProperty
0.0% 11.9% HIToolbox islSetKLPropertyForInputSource
0.0% 11.5% HIToolbox islPopulateKLPropertiesFromBundle
Reporter | ||
Updated•15 years ago
|
Whiteboard: [ts]
Reporter | ||
Comment 1•15 years ago
|
||
bz:nsCommandLine::Run 15%, this is more interesting to me
bz:calling openWindow on the widnow watcher
bz:TISGetInputSourceProperty 12.3%, what the heck is that and can we avoid it?
bz:it's called from nsChildView ctor and seems to be OS code
bz:parseplist, etc
joshmoz:bz: it is OS code, masayuki added it recently
joshmoz:bz: we have to start using TIS for intl input on mac
bz:well, it's being 12% of the main-thread non-idle startup time in this profile
joshmoz:bz: but it can only be used on 10.5 +, which is why you'll only see that on trunk
bz:do we have to do it quite this early in startup? and do we have to do it on the main thread?
joshmoz:bz: that's a question for masayuki, can you file a bug asking those two things?
bz:joelr: ^
joelr:bz: will file a bug
Reporter | ||
Comment 2•15 years ago
|
||
This is the place to look:
http://mxr.mozilla.org/mozilla-central/source/widget/src/cocoa/nsChildView.mm#658
Assignee | ||
Comment 3•15 years ago
|
||
The TIS related code in nsChildView::nsChildView is only needed at debugging, so, we don't need to run them at the starting up for the daily use.
http://mxr.mozilla.org/mozilla-central/source/widget/src/cocoa/nsChildView.mm#94
> 94 #ifdef MOZ_LOGGING
> 95 #define FORCE_PR_LOG
> 96 #endif
Looks like that the logging is enabled on the release build too.
I think that #671-#713 should be built only at debug build, and it should be enough.
Updated•15 years ago
|
blocking2.0: --- → ?
Assignee | ||
Comment 4•15 years ago
|
||
simple fix.
Assignee | ||
Comment 5•15 years ago
|
||
Ugh... the indent was changed by xcode at pasting the code :-(
Attachment #401785 -
Attachment is obsolete: true
Attachment #401786 -
Flags: review?(joshmoz)
Attachment #401785 -
Flags: review?(joshmoz)
Attachment #401786 -
Flags: review?(joshmoz) → review+
Assignee | ||
Comment 6•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Assignee | ||
Comment 7•15 years ago
|
||
Looks like the patch improves the ts value of the current trunk, so, the KL* APIs are expensive too. I should create a patch for 1.9.2 branch too, probably.
http://graphs.mozilla.org/graph.html#tests=[{%22test%22:%2216%22,%22branch%22:%221%22,%22machine%22:%22169%22},{%22test%22:%2216%22,%22branch%22:%221%22,%22machine%22:%22173%22},{%22test%22:%2216%22,%22branch%22:%221%22,%22machine%22:%22178%22}]&sel=1252833380,1253542320
Comment 8•15 years ago
|
||
Current trunk is using the Leopard stuff, no?
Assignee | ||
Comment 9•15 years ago
|
||
(In reply to comment #8)
> Current trunk is using the Leopard stuff, no?
Really? If so, we can remove the code for 10.4.
Comment 10•15 years ago
|
||
No, we can't. We're only building on 10.5 at the moment, but not purposefully breaking 10.4 yet.
Reporter | ||
Comment 11•15 years ago
|
||
Did Ts really go down 30% on this one fix?
Assignee | ||
Comment 12•15 years ago
|
||
(In reply to comment #10)
> No, we can't. We're only building on 10.5 at the moment, but not purposefully
> breaking 10.4 yet.
Hrm, ok.
(In reply to comment #11)
> Did Ts really go down 30% on this one fix?
I'm not sure. The removed code calls TIS APIs very many times because the count of the installed keyboard layouts.
And I think that we should try to land the patch to 1.9.2 branch too. The non-Leopard path outputted similar log with other APIs (KL*). And also the change is just removing the code from the release builds, so, the risk is very low. If we can improve the ts performance, it's great thing.
Comment 13•15 years ago
|
||
http://groups.google.com/group/mozilla.dev.platform/msg/284b13f7ede1cdb9 says we already broke 10.4.
Assignee | ||
Comment 14•15 years ago
|
||
Attachment #402038 -
Flags: review?(joshmoz)
Assignee | ||
Comment 15•15 years ago
|
||
oops, posted the request without comments, sorry.
The patch also removes the debugging code from 1.9.2 branch's release build. The risk is low but I'm not sure whether the patch improves how much ts value. However, I think we should try to improve the ts value on 1.9.2 branch too.
Attachment #402038 -
Flags: review?(joshmoz) → review+
Assignee | ||
Updated•15 years ago
|
Attachment #402038 -
Flags: approval1.9.2?
Attachment #402038 -
Flags: approval1.9.2? → approval1.9.2+
Assignee | ||
Comment 16•15 years ago
|
||
blocking2.0: ? → ---
status1.9.2:
--- → beta1-fixed
Comment 17•15 years ago
|
||
I think this can go on 1.9.1, if so we should do it.
Assignee | ||
Comment 18•15 years ago
|
||
(In reply to comment #17)
> I think this can go on 1.9.1, if so we should do it.
Yes, but I want to wait the ts tests. However, unfortunately, the tests were not started by my check-in :-(
Can somebody start the perf tests on 3.6's tinderbox forcedly?
Assignee | ||
Comment 19•15 years ago
|
||
Comment on attachment 402038 [details] [diff] [review]
Patch for 1.9.2 branch v1.0
http://graphs.mozilla.org/graph.html#tests=[{%22test%22:%2216%22,%22branch%22:%2210%22,%22machine%22:%22163%22},{%22test%22:%2216%22,%22branch%22:%2210%22,%22machine%22:%22156%22},{%22test%22:%2216%22,%22branch%22:%2210%22,%22machine%22:%22178%22},{%22test%22:%2216%22,%22branch%22:%2210%22,%22machine%22:%22175%22}]&sel=1253512907,1253606640
The test results were coming. Looks like that the patch cannot improve the ts performance on 10.4, but it improves it on 10.5. So, we should land the patch to 1.9.1 too.
Attachment #402038 -
Flags: approval1.9.1.4?
Comment 21•15 years ago
|
||
Comment on attachment 402038 [details] [diff] [review]
Patch for 1.9.2 branch v1.0
Approved for 1.9.1.4, a=dveditz
Attachment #402038 -
Flags: approval1.9.1.4? → approval1.9.1.4+
Assignee | ||
Updated•15 years ago
|
status1.9.1:
--- → .4-fixed
Comment 22•15 years ago
|
||
FTR this landed on 1.9.1.4: http://hg.mozilla.org/releases/mozilla-1.9.1/rev/159c10b73442
You need to log in
before you can comment on or make changes to this bug.
Description
•