[PR #878] [MERGED] Preview Playback: Speeds up by nearly 50% #1242

Closed
opened 2026-02-26 09:34:08 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/NickeManarin/ScreenToGif/pull/878
Author: @mabakay
Created: 5/3/2021
Status: Merged
Merged: 5/9/2021
Merged by: @NickeManarin

Base: feature/878-playback-performance-improvementsHead: work/playback/slowPlaybackGoesFaster


📝 Commits (5)

  • 92ade86 Merge branch 'dev'
  • 4841c73 Merge branch 'dev'
  • 77e8671 Do not update fade and slide effects preview images when not shown
  • d2fec8e Change panel visibility to hidden after close of right panel
  • 86cecc7 Hiding last panel after storyboard completes

📊 Changes

2 files changed (+54 additions, -22 deletions)

View changed files

📝 ScreenToGif/Windows/Editor.xaml (+32 -6)
📝 ScreenToGif/Windows/Editor.xaml.cs (+22 -16)

📄 Description

I have noticed that two other image controls (fade and slide effects preview) are bonded to the same image control which is used by preview play to display frames in a way that evaluates theirs bindings during playback. I have changed this by adding a condition for effect panel visibility.

In result preview playback works now roughly...50% faster. No kidding :-)

My pull request consists of two commits.

  1. First one "Do not update fade and slide effects preview images when not shown" is essential for this speed boost. It makes these bindings being applied through effects panel visibility condition.
  2. Second one "Change panel visibility to hidden after close of right panel" well...it extends code that is already there (which change visibility of last shown panel just before showing next panel) to do the same thing just after cancel or close of effects panel. Purpose of this commit is to maintain conditional binding - without it after applying fade or slide effect additional bindings will still evaluate (unnecessarily) until some other panel is shown (and visibility of last opened will be change to hidden).
    It is not clear to me why this was not happening so far. I thought that this can be intentional because of process of applying effects after closing the panel. That is why I mention it and bring it to your attention. I have tested some effect apply functionality (I mean fade and slide) and it seems to work. But this second commit touches probably every available effect. So I ask here what do you think about it? @NickeManarin

Both commits are independent of each other.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/NickeManarin/ScreenToGif/pull/878 **Author:** [@mabakay](https://github.com/mabakay) **Created:** 5/3/2021 **Status:** ✅ Merged **Merged:** 5/9/2021 **Merged by:** [@NickeManarin](https://github.com/NickeManarin) **Base:** `feature/878-playback-performance-improvements` ← **Head:** `work/playback/slowPlaybackGoesFaster` --- ### 📝 Commits (5) - [`92ade86`](https://github.com/NickeManarin/ScreenToGif/commit/92ade869d8f31c24f57fd507dd24c5ea35a16777) Merge branch 'dev' - [`4841c73`](https://github.com/NickeManarin/ScreenToGif/commit/4841c730e5b9e558612ebe31bcb12778e70b8a4b) Merge branch 'dev' - [`77e8671`](https://github.com/NickeManarin/ScreenToGif/commit/77e8671a966d577793ac7a90374bc2a827df8be2) Do not update fade and slide effects preview images when not shown - [`d2fec8e`](https://github.com/NickeManarin/ScreenToGif/commit/d2fec8e34e0a8bd88d90bdc895cb3cfbd2892f39) Change panel visibility to hidden after close of right panel - [`86cecc7`](https://github.com/NickeManarin/ScreenToGif/commit/86cecc701131a8419c1666434b083d2f6ed3e6f7) Hiding last panel after storyboard completes ### 📊 Changes **2 files changed** (+54 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `ScreenToGif/Windows/Editor.xaml` (+32 -6) 📝 `ScreenToGif/Windows/Editor.xaml.cs` (+22 -16) </details> ### 📄 Description I have noticed that two other image controls (fade and slide effects preview) are bonded to the same image control which is used by preview play to display frames in a way that evaluates theirs bindings during playback. I have changed this by adding a condition for effect panel visibility. In result preview playback works now roughly...**50% faster**. No kidding :-) My pull request consists of two commits. 1. First one "Do not update fade and slide effects preview images when not shown" is essential for this speed boost. It makes these bindings being applied through effects panel visibility condition. 2. Second one "Change panel visibility to hidden after close of right panel" well...it extends code that is already there (which change visibility of last shown panel just before showing next panel) to do the same thing just after cancel or close of effects panel. **Purpose of this commit is to maintain conditional binding - without it after applying fade or slide effect additional bindings will still evaluate (unnecessarily) until some other panel is shown (and visibility of last opened will be change to hidden)**. It is not clear to me why this was not happening so far. I thought that this can be intentional because of process of applying effects after closing the panel. That is why I mention it and bring it to your attention. I have tested some effect apply functionality (I mean fade and slide) and it seems to work. But this second commit touches probably every available effect. So I ask here what do you think about it? @NickeManarin Both commits are independent of each other. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 09:34:08 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#1242
No description provided.