You are browsing as a guest. Sign up (or log in) to start making projects!

4h 22m 48s logged

started rewriting the entire pipeline. main changes:

  1. complete MediaCenter::process_event rewrite
    rewritten completely from scratch. now takes up 40 less lines, skips invalid tracks earlier, and is much simpler to understand

  2. ticking logic improvement
    the app used to tick every 5 s to check track duration, which means 12/min. instead, i now calculate how far the 50% mark is and sleep for only that long; when we’re past it, it’ll just idle until the next track. the app now only wakes once per event, rather than 12 times/min

  3. use unicase crate to avoid unnecessary allocationsmost of the String allocations i make in the program are to_lowercase() calls for comparisons. the unicase crate allows me to make case-insensitive comparisons without extra allocations.

all of this SHOULD mean less CPU and memory usage (i’m a bit obsessed with that, if you can’t tell yet), but i havent benched anything yet

this PR edits like 500 lines but there’s only like 20 lines more than there were originally lol

0
2

Comments 0

No comments yet. Be the first!