3 ms·
I mean, it's making 720px width jpg thumbnails using the CPU https://github.com/CyberTimon/RapidRAW/blob/fc21ede729b45d9787e175035fa46ebde1961e75/src-tauri/src/
by TheDong 1y ago
I mean, it's making 720px width jpg thumbnails using the CPU https://github.com/CyberTimon/RapidRAW/blob/fc21ede729b45d9787e175035fa46ebde1961e75/src-tauri/src/file_management.rs#L24 https://github.com/CyberTimon/RapidRAW/blob/fc21ede729b45d97...
And then it's sending these thumbnails back from rust to javascript as base64 encoded strings, not using a shared buffer: https://github.com/CyberTimon/RapidRAW/blob/fc21ede729b45d9787e175035fa46ebde1961e75/src-tauri/src/file_management.rs#L280 https://github.com/CyberTimon/RapidRAW/blob/fc21ede729b45d97...
This is the sorta stuff that native apps mostly don't do. They don't base64 an image just to send it to a different app (react) to base64 decode it (via a third app, webkit) via a slow ipc mechanism (tauri) from itself to itself, allocating 6x the chunks of memory along the way for one bit of data (the 6x are: raw data in rust, base64 data in rust, json encoded base64 in rust for tauri ipc, json encoded base64 in javascript, base64 in javascript, raw image data in webkit to finally view).
- rossant 1y ago6x sounds bad. Might be a sign of vibe coding?
- ImGonnaVibeCode 1y ago>React and Rust, with the support from Google Gemini >immensely grateful for Google's Gemini >AI Studio's free tier
- maverwa 1y agona, electron/tauri/"the web" has done this long before GPT happened.
- rossant 1y agoI didn’t know the developer is 18. No snark intended. Great work. Slow or suboptimal code is common nowadays, and often it’s better to get it working before worrying about speed.
- cybertimom 1y agoYes you are completely right. This part is definitely not optimal yet. I haven't had lots of Tauri / Rust experience before this project.. it's on my todo list to improve. While trying to use the asset localhost protocol I ran into a lot of permission issues.