Use a simpler implementation of Diagnosticable.toString when running in profile/release mode#28661
Conversation
…in profile/release mode Diagnosticable.toString may be called in performance sensitive contexts (for example, creating debug labels for Tickers)
|
/cc @jacob314 |
jacob314
left a comment
There was a problem hiding this comment.
Should we only use the simpler version in release mode. We don't really care about code size in profile mode and a user trying to get decent print statement debugging output in profile mode might appreciate the full toString.
That said, turning it off in profile mode is consistent with profile mode not supporting debugging so I'm fine either way.
Is there a code size difference in release mode with this change?
I would expect there is no code size difference in profile mode as profile mode still allows dumping the widget tree as a string last I checked.
|
The concern is related to speed, not size. |
|
If the toString is actually being called as part of rendering widgets then absolutely remove it from profile mode. Is there no way to remove the toString calls from ticker? |
|
The |
Diagnosticable.toString may be called in performance sensitive contexts
(for example, creating debug labels for Tickers)