Comments (9)
My issue with the clouds is that they're moving in the same direction that the rocket is pointing. They should be moving to the left to simulate relative motion. ;)
from rocket.
The clouds are indeed causing quite a lot of CPU usage. I've optimized the drawing rate to try to minimize the effect. The CPU usage has decreased on my machine by about 70%. Hopefully this is sufficient to consider the issue closed. I really like the clouds. :)
Oh, the clouds now go the other way, too! ☁️ 🚀
from rocket.
The new requestAnimationFrame
code seems to decrease CPU usage on Chrome indeed. Still feels high IMO. One sure thing is that Safari performs insanely better than Chrome on this. However, the SVG icon rendering in Safari looks blurry, reminiscent of 1x images rendered on Retina.
How about open sourcing the website into its own repo so the community can help with that stuff? 😃
from rocket.
The homepage currently consumes 150% CPU usage in Chrome 64 (per Chrome’s task manager). Seems pretty high for an animation that’s not relevant to the content.
from rocket.
@dmikusa-pivotal Agreed. This is bad. I've rewritten the code to use individual cloud images as opposed to two large images with the theory that the renderer should be able to reuse previously painted screens. This had reduced the CPU load by 200x on my machine. I will push the changes live as soon as I polish the implementation.
from rocket.
Looks like we're okay on the clouds now. :)
@rafbm I plan open sourcing parts of the website, especially the guide, but I've struggled in choosing the right license. Happy to discuss this in #rocket. :)
from rocket.
I think the animation should be using CSS (GPU).
on local replacing the two cloud divs by spans (workaround for disabling the current expensive animation) make the cloud static.
then add the css class span.clouds {
background-position-x: -247.585px;
transform: translateX(-300px);
transition: transform 8s;
}
make clouds moove smoothly.
Values should be finetuned and reseting the position once reaching end of screen is not done (could be done in js)
from rocket.
I still see quite high CPU usage as well (Firefox 68.0.1 MacOS). The animation is neat, but when I'm trying to read the docs and not looking at it, it's still killing my battery. Maybe stop it after a certain amount of time, number of iterations across the screen, or add a little stop button or something? Just a suggestion. I will use Safari for now.
from rocket.
The fix in my previous comment has now been deployed!
from rocket.
Related Issues (20)
- Allow from form macro to work on structs with range HOT 4
- Clippy Lint w/ FromForm derive HOT 7
- Possible Incompleteness HOT 1
- Possible Incompleteness HOT 1
- doc: change `&ContentType` with `&Accept` in the list of implementations of `FromRequest` HOT 1
- [Feature]: Enhanced State Mutation for Effortless Handling of Shared Resources HOT 5
- Guide navigation causes relative links inside articles to 404 HOT 1
- Redirection to a route which takes a vector parameter results in an error HOT 1
- Allow users to create of Data<'r> objects HOT 5
- Validation not invoked on Json HOT 6
- Implement `FromForm` for `Range` HOT 1
- Missing license files in rocket_codegen-0.5.0.crate HOT 2
- Add SQLite extensions HOT 2
- Middleware that handles requests for static resources HOT 2
- Unable to build: no `Serialize` in `de` HOT 3
- Add default content_type for TempFile uploads HOT 2
- Could not find `json` in `serde` HOT 1
- Can't change IP that Rocket starts from. HOT 1
- Clippy lint: temporary with significant `Drop` can be early dropped HOT 1
- Rocket sometimes resets connection instead of responding with 413 error response HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rocket.