User Tools

Site Tools


newsletters:2024-11

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
newsletters:2024-11 [2024/12/01 03:17] adminnewsletters:2024-11 [2024/12/01 04:09] (current) osnr
Line 1: Line 1:
-====== November 2024 newsletter (WIP) ======+====== November 2024 newsletter ======
  
 (Our next Folk open house is [[https://partiful.com/e/eZXJm5gn0rxglOGi5Jsa|at noon on Sunday, December 15]], at our studio in East Williamsburg, Brooklyn.) (Our next Folk open house is [[https://partiful.com/e/eZXJm5gn0rxglOGi5Jsa|at noon on Sunday, December 15]], at our studio in East Williamsburg, Brooklyn.)
Line 22: Line 22:
  
 There's still a lot of blinking under the new evaluator, but no ghosting, and I think the blinking all now emerges from genuine failures to meet timing (the label blinks out because the program region wasn't regenerated in time for the current frame). There's still a lot of blinking under the new evaluator, but no ghosting, and I think the blinking all now emerges from genuine failures to meet timing (the label blinks out because the program region wasn't regenerated in time for the current frame).
 +
 +Notice how the camera hits 60fps but the full-frame detection is only 20-30fps (this is using a 1080p image):
 +
 +{{:newsletters:pasted:20241201-040919.png?550px}}
  
 === The bugfixes and improvements === === The bugfixes and improvements ===
Line 43: Line 47:
       * now runs on an independent clock from the frames! every 2ms       * now runs on an independent clock from the frames! every 2ms
     * hack for 'descriptor indexing' on Pi GPU so images & text work     * hack for 'descriptor indexing' on Pi GPU so images & text work
 +    * incremental tag detection to be able to hit 60fps
  
  
Line 51: Line 56:
 Performance (CPU, stack) profiling is most of what I'm up to now, trying to eliminate the blinking. Performance (CPU, stack) profiling is most of what I'm up to now, trying to eliminate the blinking.
  
-I've already fixed a lot of weird issues with flamegraph profiling and made it noticeably smoother.+I've already fixed a lot of weird issues using flamegraph profiling and made it noticeably smoother. Like replacing rand with rand_r to fix this: 
 + 
 +{{:newsletters:pasted:20241201-034841.png?400px}} 
 + 
 +I'm surprised at how much of the flamegraphs are just threading stuff, not Tcl-bound. Maybe I'm misreading and need different graphs (the mutex time is just time when it's scheduled off the CPU, not wasted time). Here is an average worker thread: 
 + 
 +{{:newsletters:pasted:20241201-034557.png?600px}}
  
-I'm surprised at how much of the flamegraphs are just threading stuffnot Tcl-bound. Maybe I'm misreading and need different graphs.+Now working on actually using [[https://github.com/wolfpld/tracy|Tracy]] to get a full view of what's going onwhich I've been curious about for years.
  
 == Heap profiling == == Heap profiling ==
  
-There are still persistent and pretty bad memory leaks on folk2, from 10MB to 200MB per second depending on how much stuff is out. I want to get to these soon after fixing the performance stuff.+There are still persistent and pretty bad memory leaks on folk2, from 10MB to 200MB per second depending on how much stuff is out. I want to get to these soon after I fix the performance stuff.
  
 === Various unsuccessful quests === === Various unsuccessful quests ===
  
   * Heap profiling with gperftools   * Heap profiling with gperftools
 +    * Too slow, doesn't seem to detect most of the heap?
   * mimalloc arenas   * mimalloc arenas
 +    * Might still be useful for images and stuff, but we'd need to migrate the arena between matches and statements as statements get reused, it's more complicated than expected
   * Sealed Tcl objects   * Sealed Tcl objects
     * I had been hoping to do this forever -- it seems elegant and cool and efficient -- but it turned out to be much harder than expected when I looked at it -- would need to change a lot of callsites in Jim Tcl (anywhere it shimmers an object) to make it work, or do horrible hacks with COW pages.     * I had been hoping to do this forever -- it seems elegant and cool and efficient -- but it turned out to be much harder than expected when I looked at it -- would need to change a lot of callsites in Jim Tcl (anywhere it shimmers an object) to make it work, or do horrible hacks with COW pages.
 +    * {{:newsletters:pasted:20241201-040815.png?550px}}
   * CPU-oriented scheduling   * CPU-oriented scheduling
   * Spinlocks   * Spinlocks
     * [[https://www.realworldtech.com/forum/?threadid=189711&curpostid=189723|Linus is probably right]]     * [[https://www.realworldtech.com/forum/?threadid=189711&curpostid=189723|Linus is probably right]]
     * I got too excited since we have fairly tight locking discipline in folk2     * I got too excited since we have fairly tight locking discipline in folk2
 +    * Look at all this spinning; it's not an improvement over mutexes:
 +      * {{:newsletters:pasted:20241201-034649.png?500px}}
  
 ==== RFID localization ==== ==== RFID localization ====
Line 100: Line 116:
 These are all 'minor' additions to the gadget that I want to throw into future revisions (and have ordered parts for). These are all 'minor' additions to the gadget that I want to throw into future revisions (and have ordered parts for).
  
-I've been talking about a trigger button for a while. Realized that some commercially available camera grips just use an audio jack. This seems good. Threw it into part orders and will probably throw it into next design rev.+I've been talking about a trigger button for a while, but been blocked by figuring out what connectors/cables to use so the handle grip with trigger button can be removable (in case you want to mount onto an arm). Realized that [[https://www.amazon.com/CB-800-Universal-Pistol-Shutter-Release/dp/B01KMKZ3AY/|some commercially available camera grips just use a 2.5mm jack for a button output.]] This seems good. Let's use a 3.5mm audio jack (TRRS) instead. Threw that into part orders and will probably throw it into next design rev.
  
-I'm thinking about the Super Mario Galaxy Wii remote interactions and sounds for some reason.+as for what to do with the trigger button, I'm thinking about the Super Mario Galaxy Wii remote interactions and sounds...
  
 (I also threw a speaker into part orders.) (I also threw a speaker into part orders.)
Line 148: Line 164:
   * Gadget autoadjust exposure maybe?   * Gadget autoadjust exposure maybe?
   * RFID   * RFID
 +  * Actually revisit video support
 +  * More convenient shader language
 +  * Experiment with more tangible papercraft interface elements for Folk programs (using cardboard, rubberbands, etc.)
 +  * Revisit a bunch of smaller system improvements that we've had in the backlog for a while
  
 ===== Links we've enjoyed ===== ===== Links we've enjoyed =====
newsletters/2024-11.1733023050.txt.gz · Last modified: 2024/12/01 03:17 by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki