Skip to content

[BUG]: Performance problems in FallingStarsBg.vue #247

@NirvanaCh7

Description

@NirvanaCh7

Environment

Mac Studio M1 Max MacOS 15.5, Edge & Safari latest
Even on official website

Describe the bug

I noticed that on my Mac , the animation uses a lot of GPU — almost 100% — and runs at only around 10–30 FPS.
The bigger the canvas , the worse it gets.
Tried both Edge and Safari, same result. Other components work fine.
On Windows it runs totally fine with smooth performance.

After checking the code, the main problem is caused by the shadowBlur .

ctx.shadowBlur = 35; // Add blur to the trail

I feel like the blur effect isn’t very noticeable — maybe we could try stacking a few layers with low opacity instead.

I found there are quite a few functions in animate()(for example, getContext("2d")) that are being called every frame unnecessarily, maybe. As for hexToRgb(), maybe it was meant for adding color-changing effects later?

Reproduction

No response

Additional context

No response

Screenshots

Image

Logs

Additional information

  • Would you be willing to fix this bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions