Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Optimize ar preview#17134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ProblemShooter wants to merge2 commits intoAUTOMATIC1111:master
base:master
Choose a base branch
Loading
fromProblemShooter:optimize-ar-preview

Conversation

@ProblemShooter
Copy link

Refactored the dimensionChange logic and AR preview handling for better performance and readability.
The code now caches repeated DOM queries like gradioApp() and the AR preview div to avoid unnecessary lookups on every input event.
Type conversions were simplified, and redundant calculations were reduced for efficiency.

The AR preview rendering now uses requestAnimationFrame instead of setTimeout for smoother updates, ensuring better user experience.
Event listeners for width and height inputs are added only once, and input value handling is streamlined for clarity.
Overall, this reduces memory usage and improves responsiveness when updating image dimensions.

Additional optimizations include combining repetitive logic for tab selection, scaling, and centering calculations,
making the code easier to maintain and extend in the future. This commit keeps all existing functionality intact while improving performance and maintainability.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@AUTOMATIC1111AUTOMATIC1111Awaiting requested review from AUTOMATIC1111AUTOMATIC1111 is a code owner

At least 5 approving reviews are required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@ProblemShooter

[8]ページ先頭

©2009-2025 Movatter.jp