Closed
Bug 772060
Opened 12 years ago
Closed 5 years ago
[Mac] After initial page load, first VoiceOver interaction with HTML content still very painfully slow
Categories
(Core :: Disability Access APIs, defect, P3)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: MarcoZ, Unassigned)
References
()
Details
(Keywords: perf, Whiteboard: [sps][leave open][mac2020_2])
Attachments
(1 file, 3 obsolete files)
(deleted),
patch
|
tbsaunde
:
review+
hub
:
checkin+
|
Details | Diff | Splinter Review |
STR:
1. With VoiceOver on, load http://www.heise.de/mac-and-i
2. Wait until VoiceOver announces "HTML content".
3. Press CTRL+Option+Shift+DownArrow to start interaction and start reading the content.
Result: On my 2.7 gHz Core I5 MacBook pro, VoiceOver will now say "Firefox Nightly busy", and it will not come back with any other reaction for 50 (that's fifty) seconds. Then, it will say "Firefox Nightly Ready".
Smaller pages like the Firefox start page are faster, the more content on a page, the slower it gets.
Comment 1•12 years ago
|
||
How long should I wait between 1 and 2?
Comment 2•12 years ago
|
||
OK I think this is a relevant profile: http://is.gd/lpj44g
Reporter | ||
Comment 3•12 years ago
|
||
Comment 4•12 years ago
|
||
Yes our profiles are similar.
Comment 5•12 years ago
|
||
When I run this on debug, one of the stack trace I find taking some time (not that much, but still) is bug 768997. It is a regression.
Comment 6•12 years ago
|
||
(In reply to Hub Figuiere [:hub] from comment #5)
> When I run this on debug, one of the stack trace I find taking some time
> (not that much, but still) is bug 768997. It is a regression.
profiling debug builds is basically pointless. That code is only in debug builds which aren't the issue we care about here, so its not relevent.
Comment 7•12 years ago
|
||
Marco, is it a debug build or a release build you use?
Reporter | ||
Comment 8•12 years ago
|
||
Release, regular nightly. I usually test with that to get as close to the end user experience as possible. Unless I note otherwise, you can always assume I run a release build.
Updated•12 years ago
|
Whiteboard: [sps]
Comment 10•12 years ago
|
||
Comment 11•12 years ago
|
||
Comment on attachment 652865 [details] [diff] [review]
Implement accessibilityArrayAttributeCount for mozPaneAccessible. r=
This one remove some "noise" in the performance analysis. A trivial performance improvement.
Attachment #652865 -
Flags: review?(surkov.alexander)
Comment 12•12 years ago
|
||
Comment on attachment 652865 [details] [diff] [review]
Implement accessibilityArrayAttributeCount for mozPaneAccessible. r=
>
>+- (NSUInteger)accessibilityArrayAttributeCount:(NSString *)attribute
nit type* name
>+ if([attribute isEqualToString:NSAccessibilityChildrenAttribute]) {
>+ return mGeckoAccessible->ChildCount() ? 1 : 0;
I think you could just use FirstChild() here which would be a bit faster.
>+ }
nit, no braces
Comment 13•12 years ago
|
||
I don't think FirstChild() would be faster. ChildCount() just call mChildren.Length().
Comment 14•12 years ago
|
||
Updated•12 years ago
|
Attachment #652865 -
Attachment is obsolete: true
Attachment #652865 -
Flags: review?(surkov.alexander)
Comment 15•12 years ago
|
||
Comment on attachment 652947 [details] [diff] [review]
Part 1: Implement accessibilityArrayAttributeCount for mozPaneAccessible. r=
Dealt with the 'nit from Trevor.
Attachment #652947 -
Flags: review?(surkov.alexander)
Comment 16•12 years ago
|
||
(In reply to Hub Figuiere [:hub] from comment #13)
> I don't think FirstChild() would be faster. ChildCount() just call
> mChildren.Length().
true, but its virtual, FirsChild isn't
Comment 17•12 years ago
|
||
Comment on attachment 652947 [details] [diff] [review]
Part 1: Implement accessibilityArrayAttributeCount for mozPaneAccessible. r=
Review of attachment 652947 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with my and Trevor's comments addressed
::: accessible/src/mac/mozActionElements.mm
@@ +342,5 @@
> +{
> + if (!mGeckoAccessible)
> + return 0;
> +
> + if([attribute isEqualToString:NSAccessibilityChildrenAttribute])
nit: space after if
please add a comment that this is a performance trick because mozPaneAccessible doesn't keep its child in the cached children array
Attachment #652947 -
Flags: review?(surkov.alexander) → review+
Comment 18•12 years ago
|
||
(In reply to Trevor Saunders (:tbsaunde) from comment #16)
> (In reply to Hub Figuiere [:hub] from comment #13)
> > I don't think FirstChild() would be faster. ChildCount() just call
> > mChildren.Length().
>
> true, but its virtual, FirsChild isn't
FirstChild() calls GetChildAt() (inline)
GetChildAt() (virtual) calls mChildren.SafeElementAt() which call nsTArray<>::Length().
Comment 19•12 years ago
|
||
(In reply to Hub Figuiere [:hub] from comment #18)
> (In reply to Trevor Saunders (:tbsaunde) from comment #16)
> > (In reply to Hub Figuiere [:hub] from comment #13)
> > > I don't think FirstChild() would be faster. ChildCount() just call
> > > mChildren.Length().
> >
> > true, but its virtual, FirsChild isn't
>
> FirstChild() calls GetChildAt() (inline)
> GetChildAt() (virtual) calls mChildren.SafeElementAt() which call
> nsTArray<>::Length().
err, yeah, I should have said ContentChildCount(), but I'm not absolutely sure I think that's a good idea to use here (we should clarify exactly when we support using that).
Comment 20•12 years ago
|
||
Yeah maybe we can use ContentChildCount() as I believe we'll only encounter that kind of child (it is not a treeview or something)
Comment 21•12 years ago
|
||
Updated•12 years ago
|
Attachment #652947 -
Attachment is obsolete: true
Comment 22•12 years ago
|
||
Comment on attachment 653520 [details] [diff] [review]
Part 1: Implement accessibilityArrayAttributeCount for mozPaneAccessible.
use ContentChildCount() instead of ChildCount. Other nits addressed.
Attachment #653520 -
Flags: review?(trev.saunders)
Comment 23•12 years ago
|
||
Comment on attachment 653520 [details] [diff] [review]
Part 1: Implement accessibilityArrayAttributeCount for mozPaneAccessible.
Review of attachment 653520 [details] [diff] [review]:
-----------------------------------------------------------------
::: accessible/src/mac/mozActionElements.mm
@@ +338,5 @@
>
> @implementation mozPaneAccessible
>
> +// By default this calls -[[mozAccessible children] count].
> +// Since we don't cache mChildren find a faster way.
it makes sense to move this comment to the code it's about, i.e. before that if statement. I assume this method might be used to speed up other properties as well.
@@ +345,5 @@
> + if (!mGeckoAccessible)
> + return 0;
> +
> + if ([attribute isEqualToString:NSAccessibilityChildrenAttribute])
> + return mGeckoAccessible->ContentChildCount() ? 1 : 0;
I wouldn't use ContentChildCount() until it's a real bottleneck.
Comment 24•12 years ago
|
||
Updated•12 years ago
|
Attachment #653520 -
Attachment is obsolete: true
Attachment #653520 -
Flags: review?(trev.saunders)
Comment 25•12 years ago
|
||
Comment on attachment 653752 [details] [diff] [review]
Part 1: Implement accessibilityArrayAttributeCount for mozPaneAccessible.
Using ChildCount() again.
Attachment #653752 -
Flags: review?(trev.saunders)
Comment 26•12 years ago
|
||
Comment on attachment 653752 [details] [diff] [review]
Part 1: Implement accessibilityArrayAttributeCount for mozPaneAccessible.
># HG changeset patch
># User Hubert Figuière <hfiguiere@mozilla.com>
># Date 1342052959 25200
># Node ID 072e6d50c5c30910919301d0051fb69ac14bd63e
># Parent 75ed4a4cc1024e35dd3577e52d818face035c2b7
>Bug 772060 - Part 1: Implement accessibilityArrayAttributeCount for mozPaneAccessible. r=surkov,tbsaunde
>
>diff --git a/accessible/src/mac/mozActionElements.mm b/accessible/src/mac/mozActionElements.mm
>--- a/accessible/src/mac/mozActionElements.mm
>+++ b/accessible/src/mac/mozActionElements.mm
>@@ -333,16 +333,29 @@ enum CheckboxValue {
> [mTabs release];
> mTabs = nil;
> }
>
> @end
>
> @implementation mozPaneAccessible
>
>+- (NSUInteger)accessibilityArrayAttributeCount:(NSString*)attribute
>+{
>+ if (!mGeckoAccessible)
>+ return 0;
>+
>+ // By default this calls -[[mozAccessible children] count].
>+ // Since we don't cache mChildren find a faster way.
find a faster way is a little funny phraseing to me, how about "so this is faster"
Attachment #653752 -
Flags: review?(trev.saunders) → review+
Comment 27•12 years ago
|
||
Updated•12 years ago
|
Whiteboard: [sps] → [sps][leave open]
Updated•12 years ago
|
Attachment #653752 -
Flags: checkin+
Comment 28•12 years ago
|
||
Backed out because it landed on a burning tree
https://hg.mozilla.org/integration/mozilla-inbound/rev/46365c62935c
Comment 29•12 years ago
|
||
Comment 30•12 years ago
|
||
Comment 31•6 years ago
|
||
Marcoz, is this still an issue? It is the last open bug blocking meta bug 454202
Flags: needinfo?(mzehe)
Reporter | ||
Comment 32•6 years ago
|
||
Yes, and there are probably many more since this got filed. Mac isn't a priority for us right now, so I wouldn't count on that dependency tree to be accurate.
Flags: needinfo?(mzehe)
Comment 33•5 years ago
|
||
Hey Marco.
Is this still an issue? :)
Morgan and I tried reproducing with no luck.
Flags: needinfo?(mzehe)
Reporter | ||
Comment 34•5 years ago
|
||
It might not. But I currently have no Mac to verify. It used to depend on the complexity of the page, for example a page with a lot of links and lists seemed to make things a lot slower. One page I like to use is this German IT news page: https://www.heise.de/newsticker.
Flags: needinfo?(mzehe)
Comment 35•5 years ago
|
||
Compared to safari on that site, I do get lag.
Updated•5 years ago
|
Whiteboard: [sps][leave open] → [sps][leave open][mac2020_2]
Updated•5 years ago
|
Priority: -- → P3
Reporter | ||
Comment 36•5 years ago
|
||
This is no longer an issue since bug 1618364 landed. Interaction is now instantaneous.
You need to log in
before you can comment on or make changes to this bug.
Description
•