Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
fzyzcjy committed Oct 16, 2022
1 parent d9a8335 commit ee39efe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
3 changes: 0 additions & 3 deletions website/docs/benchmark/analyze/overhead/end-to-end.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Result from component
# Result

:::caution

Expand All @@ -8,11 +8,9 @@ The `MaybePreemptRender` is slow (needs syscall) now, causing larger overhead. I

Let us discuss the possible overhead components:

1. `MaybePreemptRender` checks - overhead. In each preempt point, we have to check whether it is time to trigger a preempt render. Currently it is slow as it needs one syscall, but it can be (and should be) optimized in https://github.com/fzyzcjy/flutter_smooth/issues/110.
1. `MaybePreemptRender` checks - overhead. In each preempt point, we have to check whether it is time to trigger a preempt render.
2. Preempt render - not overhead. To my best knowledge, any solution that wants to achieve 60FPS has to run the build/layout/paint/etc pipeline for the part that wants to be changing. Therefore, it is inevitable to have this component. (Feel free to correct me if you come up with a faster solution without that.) By the way, this part strongly depends on your use case. If you have simple animations this will be fast, while for extremely fancy animations it can be slow.

Thus, the question remains to be, how slow is `MaybePreemptRender` checks?

[TODO]
Thus, the question remains to be, how slow is `MaybePreemptRender` checks? By using the `overhead.py`, we know the average of one such check is 22.57 microseconds on my machine. In other words, since (by looking at tracing data) we call it roughly once per millisecond, it is **2.3%** overhead (again, the underlying implementation is super slow and will be optimized).

<small>(To reproduce this, create your own tracing data using latest code, instead of using the sample tracing json in this repo - I recorded that prior to writing this section and that data does not include MaybePreemptRender timeline events.)</small>
3 changes: 1 addition & 2 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ const sidebars = {
},
items: [
'benchmark/analyze/overhead/definition',
'benchmark/analyze/overhead/component',
'benchmark/analyze/overhead/end-to-end',
'benchmark/analyze/overhead/result',
],
},
'benchmark/analyze/waste',
Expand Down

0 comments on commit ee39efe

Please sign in to comment.