WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 184990
Web Inspector: Canvas tab: Determine isFunction by looking at the prototype
https://bugs.webkit.org/show_bug.cgi?id=184990
Summary
Web Inspector: Canvas tab: Determine isFunction by looking at the prototype
Devin Rousso
Reported
2018-04-25 12:51:17 PDT
Instead of maintaining a static list of function calls on the different canvas context types, we can just look at the prototype to determine if a given key resolves to a function.
Attachments
Patch
(8.25 KB, patch)
2018-04-25 12:57 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews103 for mac-sierra
(2.55 MB, application/zip)
2018-05-01 17:46 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews106 for mac-sierra-wk2
(3.34 MB, application/zip)
2018-05-01 18:26 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews114 for mac-sierra
(3.18 MB, application/zip)
2018-05-01 19:23 PDT
,
EWS Watchlist
no flags
Details
Patch
(9.81 KB, patch)
2018-05-01 22:02 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews200 for win-future
(12.87 MB, application/zip)
2018-05-02 00:36 PDT
,
EWS Watchlist
no flags
Details
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Devin Rousso
Comment 1
2018-04-25 12:57:34 PDT
Created
attachment 338771
[details]
Patch
EWS Watchlist
Comment 2
2018-05-01 17:46:29 PDT
Comment hidden (obsolete)
Comment on
attachment 338771
[details]
Patch
Attachment 338771
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/7530624
New failing tests: inspector/canvas/recording-2d.html
EWS Watchlist
Comment 3
2018-05-01 17:46:30 PDT
Comment hidden (obsolete)
Created
attachment 339248
[details]
Archive of layout-test-results from ews103 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-sierra Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 4
2018-05-01 18:26:39 PDT
Comment hidden (obsolete)
Comment on
attachment 338771
[details]
Patch
Attachment 338771
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/7530960
New failing tests: inspector/canvas/recording-2d.html
EWS Watchlist
Comment 5
2018-05-01 18:26:40 PDT
Comment hidden (obsolete)
Created
attachment 339251
[details]
Archive of layout-test-results from ews106 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 6
2018-05-01 19:23:45 PDT
Comment hidden (obsolete)
Comment on
attachment 338771
[details]
Patch
Attachment 338771
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/7531248
New failing tests: inspector/canvas/recording-2d.html
EWS Watchlist
Comment 7
2018-05-01 19:23:46 PDT
Comment hidden (obsolete)
Created
attachment 339258
[details]
Archive of layout-test-results from ews114 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-sierra Platform: Mac OS X 10.12.6
Devin Rousso
Comment 8
2018-05-01 22:02:24 PDT
Created
attachment 339276
[details]
Patch
EWS Watchlist
Comment 9
2018-05-02 00:36:17 PDT
Comment hidden (obsolete)
Comment on
attachment 339276
[details]
Patch
Attachment 339276
[details]
did not pass win-ews (win): Output:
http://webkit-queues.webkit.org/results/7534477
New failing tests: http/tests/preload/onload_event.html
EWS Watchlist
Comment 10
2018-05-02 00:36:29 PDT
Comment hidden (obsolete)
Created
attachment 339287
[details]
Archive of layout-test-results from ews200 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews200 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Devin Rousso
Comment 11
2018-05-02 00:49:02 PDT
Comment on
attachment 339287
[details]
Archive of layout-test-results from ews200 for win-future Unrelated failure
Blaze Burg
Comment 12
2018-05-03 09:27:34 PDT
Comment on
attachment 339276
[details]
Patch r=me How often is this code called? Does it affect performance to dynamically look up for every call, rather than using a fixed Set lookup?
Devin Rousso
Comment 13
2018-05-03 16:17:17 PDT
(In reply to Brian Burg from
comment #12
)
> How often is this code called? Does it affect performance to dynamically > look up for every call, rather than using a fixed Set lookup?
`WI.RecoringAction.isFunctionForType` is called once per `WI.RecordingAction` (assuming it has been `swizzle()`d), and is called for each value in the `WI.Recording`'s `initialState.attributes`. I think a good middle-ground would be to keep the `WI.RecordingAction._functionNames` object, but have it be filled with values as each action is processed (sort of like a memoization).
Blaze Burg
Comment 14
2018-05-03 16:52:44 PDT
(In reply to Devin Rousso from
comment #13
)
> (In reply to Brian Burg from
comment #12
) > > How often is this code called? Does it affect performance to dynamically > > look up for every call, rather than using a fixed Set lookup? > `WI.RecoringAction.isFunctionForType` is called once per > `WI.RecordingAction` (assuming it has been `swizzle()`d), and is called for > each value in the `WI.Recording`'s `initialState.attributes`. I think a > good middle-ground would be to keep the `WI.RecordingAction._functionNames` > object, but have it be filled with values as each action is processed (sort > of like a memoization).
If you can capture a profile during the initial setup, and you can't see this code, then don't bother optimizing it.
Devin Rousso
Comment 15
2018-05-04 11:23:31 PDT
(In reply to Brian Burg from
comment #14
)
> (In reply to Devin Rousso from
comment #13
) > > (In reply to Brian Burg from
comment #12
) > > > How often is this code called? Does it affect performance to dynamically > > > look up for every call, rather than using a fixed Set lookup? > > `WI.RecoringAction.isFunctionForType` is called once per > > `WI.RecordingAction` (assuming it has been `swizzle()`d), and is called for > > each value in the `WI.Recording`'s `initialState.attributes`. I think a > > good middle-ground would be to keep the `WI.RecordingAction._functionNames` > > object, but have it be filled with values as each action is processed (sort > > of like a memoization). > > If you can capture a profile during the initial setup, and you can't see > this code, then don't bother optimizing it.
I was able to get a profile of it while recording the canvas on <
http://acko.net
> and it only took 0.1ms. The worst I've seen so far (100k actions) was 0.9ms. I think it's fine as is.
WebKit Commit Bot
Comment 16
2018-05-04 11:50:36 PDT
Comment on
attachment 339276
[details]
Patch Clearing flags on attachment: 339276 Committed
r231368
: <
https://trac.webkit.org/changeset/231368
>
WebKit Commit Bot
Comment 17
2018-05-04 11:50:38 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 18
2018-05-04 11:52:35 PDT
<
rdar://problem/39984315
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug