Commit 09aea51
authored
SG-40852: Improve paint speed degrading as you draw many annotations (#984)
### Linked issues
SG-40852
### Summarize your change.
Pretty significant fix in the management of the annotation fbo cache for
the current frame, which got broken some years ago.
In a nutshell, the rendered fbo cache should always have all of the
paint commands (eg: annotation) rendered in it, except for the last
paint command, in case we're currently editing it (eg: drawing a
stroke).
Somehow, this cache management was really borked. It would fail to find
a cache, then draw all annotations in the cache, keep the cache. At the
next redraw, it would find the cache, render the start of a new stroke,
but as you edited it, it wouldn't find the cache anymore, recreated the
cache, found apply the last stroke, which would somehow invalidate the
cache, and at the next update it would go through this cycle again. In
other words, it would redraw everything, every time.
I've made a fix such that when a new stroke is added, it will
(unfortunately) still draw everything, but as the stroke updates, it
will keep only rendering a single paint command on top of the cache,
until you start a new stroke.
Repainting all strokes when you start a new one, if you have many, like
250+ srokes, might take like 150ms, which is a definitely a lot, but it
fixes the problem where you'd pay the 150ms at every single mouse move
(ugh).
Anyway, things should be be much better now.
### Describe the reason for the change.
customer complaints, and could reproduce this easily with rv_tests
scripts.
### Describe what you have tested and on which operating system.
macOS.
### Add a list of changes, and note any that might need special
attention during the review.
During the review, you should make sure that nothing got broken in the
process. Try all tools: reaser, pen, dodge, burn, etc.
You should also verify that simulateneous paint strokes in live review
collab mode still works.
In particular, @bernie-laberge, please make sure that your fix for
recomputing the render ID still works.
During testing, please do the following:
- Start OLD RV (eg:last week). Open media. Press F10 to show annotate
tools
- Start NEW RV (this VT build). Open media. Press F10 also
Both RV, do:
-> Menu -> RV Tests -> Automatic Annotation Drawing -> start drawing
circles.
(load rv tests package if not done so already)
Both RVs should start to draw circles.
Let it got for a few minutes. After a while, maybe 5-6-10 minutes, the
OLD RV should be extremely slow. The NEW RV will have slowed down a bit,
but not nearly as bad. (note: this will create hundreds and hundreds of
strokes at that frame,
### If possible, provide screenshots.
---------
Signed-off-by: Patrick Bergeron <[email protected]>1 parent b5914bb commit 09aea51
2 files changed
+38
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
1595 | 1596 | | |
1596 | 1597 | | |
1597 | 1598 | | |
1598 | | - | |
1599 | | - | |
| 1599 | + | |
1600 | 1600 | | |
1601 | 1601 | | |
1602 | 1602 | | |
| |||
4854 | 4854 | | |
4855 | 4855 | | |
4856 | 4856 | | |
4857 | | - | |
4858 | | - | |
4859 | | - | |
4860 | 4857 | | |
4861 | 4858 | | |
4862 | 4859 | | |
| |||
4905 | 4902 | | |
4906 | 4903 | | |
4907 | 4904 | | |
4908 | | - | |
4909 | 4905 | | |
4910 | 4906 | | |
4911 | 4907 | | |
4912 | 4908 | | |
| 4909 | + | |
| 4910 | + | |
| 4911 | + | |
| 4912 | + | |
| 4913 | + | |
| 4914 | + | |
| 4915 | + | |
| 4916 | + | |
| 4917 | + | |
| 4918 | + | |
| 4919 | + | |
| 4920 | + | |
| 4921 | + | |
| 4922 | + | |
| 4923 | + | |
| 4924 | + | |
4913 | 4925 | | |
4914 | 4926 | | |
4915 | 4927 | | |
| |||
5049 | 5061 | | |
5050 | 5062 | | |
5051 | 5063 | | |
5052 | | - | |
| 5064 | + | |
| 5065 | + | |
| 5066 | + | |
5053 | 5067 | | |
5054 | 5068 | | |
5055 | 5069 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | 787 | | |
814 | 788 | | |
815 | 789 | | |
| |||
875 | 849 | | |
876 | 850 | | |
877 | 851 | | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
878 | 869 | | |
879 | 870 | | |
880 | 871 | | |
| |||
0 commit comments