Skip to content

image-source: Make maximum memory usage a source property#6264

Closed
an0ndev wants to merge 1 commit into
obsproject:masterfrom
an0ndev:max_memory_usage_property
Closed

image-source: Make maximum memory usage a source property#6264
an0ndev wants to merge 1 commit into
obsproject:masterfrom
an0ndev:max_memory_usage_property

Conversation

@an0ndev

@an0ndev an0ndev commented Apr 1, 2022

Copy link
Copy Markdown

Description

Moves the maximum memory usage setting to a per-source configurable
property. The current default of 400MB is maintained:
image

Motivation and Context

Partial fix for a pinned issue, #3366.
A redesign is complete but needs review. This is a much more minor change that should make the current version
of the slideshow source more user-friendly until the redesign can be reviewed.

How Has This Been Tested?

Tested on Ubuntu 21.10 from upstream master.
Changing the limit through the UI changes the number of images that successfully load.

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation. (N/A)

@RytoEX RytoEX left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per our Contributing guildelines, please make these changes:

  1. Use the correct commit prefix, in this case "image-source: ".

@WizardCM WizardCM added the kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. label Apr 2, 2022
@an0ndev an0ndev force-pushed the max_memory_usage_property branch 2 times, most recently from f555874 to c2affb7 Compare April 2, 2022 05:06
@an0ndev

an0ndev commented Apr 2, 2022

Copy link
Copy Markdown
Author

Per our Contributing guildelines, please make these changes:

  1. Use the correct commit prefix, in this case "image-source: ".

👍🏻 done, ty for reviewing :)

@an0ndev an0ndev changed the title obs-slideshow: Make maximum memory usage a source property image-source: Make maximum memory usage a source property Apr 2, 2022
SlideShow.NextSlide="Next Slide"
SlideShow.PreviousSlide="Previous Slide"
SlideShow.HideWhenDone="Hide when slideshow is done"
SlideShow.MaxMemoryUsage="Maximum Memory Usage (megabytes)"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SlideShow.MaxMemoryUsage="Maximum Memory Usage (megabytes)"
SlideShow.MaxMemoryUsage="Maximum VRAM Usage"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe even better: "Maximum Graphics Memory Usage"?

I think "VRAM" is an abbreviation that might already be confusing to non-programmers/non-gamers.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotcha, modified.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Maximum GPU Memory Usage" sounds clearer to me. "Graphics" is pretty abstract, while this directly refers to the hardware in question, just like you would say "CPU Usage" and not "Compute usage".

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 updated to "Maximum GPU Memory Usage"

Comment thread plugins/image-source/obs-slideshow.c Outdated
file_filter, path.array);
dstr_free(&path);

obs_properties_add_int(ppts, S_MAX_MEMORY_USAGE, T_MAX_MEMORY_USAGE, 0,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than (megabytes) in the displayed string, use obs_property_int_set_suffix() to display it in the input (ideally as " MB").

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, cool, added the implementation :)

@an0ndev an0ndev force-pushed the max_memory_usage_property branch 3 times, most recently from d579b20 to b76aa28 Compare April 3, 2022 07:32
Moves the maximum memory usage setting of the slide show source
to a per-source configurable property. The current default of
400MB is maintained.
@an0ndev an0ndev force-pushed the max_memory_usage_property branch from b76aa28 to ad0aee3 Compare April 3, 2022 14:33
@an0ndev

an0ndev commented Apr 7, 2022

Copy link
Copy Markdown
Author

Hi, if someone wouldn't mind taking a look at this again, it would be much appreciated :) I have made the requested changes and think this patch overall might alleviate some slideshow source-related spam.

@Fenrirthviti

Copy link
Copy Markdown
Member

PRs are reviewed as time allows. We have weekly meetings to go over new and pending PRs in the order they are submitted, and in the priority and urgency we assign to them. No need to remind us, we know this is here. :)

@an0ndev

an0ndev commented Apr 7, 2022

Copy link
Copy Markdown
Author

Oh, gotcha, thank you 👍🏻 👍🏻

@TheRenegadist

TheRenegadist commented May 21, 2022

Copy link
Copy Markdown

Thank you for doing this an0ndev, I'm hoping this temporary change can be implemented so I can stop using Wallpaper Engine to display fan-art slideshows because I hit the hardcoded memory limit after just a dozen or so images.

@an0ndev

an0ndev commented Aug 1, 2022

Copy link
Copy Markdown
Author

any chance somebody could review this? it causes big issues in my workflow (church services with slides), a quick look would be greatly appreciated. thank you :)

@Lain-B

Lain-B commented Jan 12, 2024

Copy link
Copy Markdown
Collaborator

This is no longer necessary because the slideshow has been rewritten to allow as many files as you'd like:
a4f2290

@Lain-B Lain-B closed this Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement Enhancements are not bugs or new features but can improve usability or performance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants