Skip to content

Conversation

hmnd
Copy link
Contributor

@hmnd hmnd commented Oct 5, 2025

I noticed that when leaving the docs or playground open in the background, it lead to heavier than expected CPU usage. It looks like the floating boat and cloud animations were causing this. I converted the former to use pure css, and changed the latter to use transform instead of background-position which tends to be a lot more gpu intensive.

For example, this is the before and after (memory usage because dev server):
image

@hmnd hmnd force-pushed the push-xusoxwtyuuvw branch from 3ba3dac to 5a14fda Compare October 5, 2025 20:01
@hmnd hmnd changed the title refactor(docs): make boat animation use css for lower perf impact refactor(docs): make boat/cloud animations use css for lower perf impact Oct 5, 2025
Copy link
Member

@ssalbdivad ssalbdivad left a comment

Choose a reason for hiding this comment

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

This is the kind of thing I could easily have never noticed but is a huge help, especially for heavy users of our docs which are my favorite kinds of people 🤓

Thanks so much!

<motion.div
className="pointer-events-none"
initial={{
export const FloatYourBoat = () => (
Copy link
Member

Choose a reason for hiding this comment

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

The logic ends up being simpler as well 😍

@ssalbdivad ssalbdivad merged commit 6e48500 into arktypeio:main Oct 14, 2025
6 checks passed
@github-project-automation github-project-automation bot moved this from To do to Done (merged or closed) in arktypeio Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done (merged or closed)

Development

Successfully merging this pull request may close these issues.

2 participants