sprig.md (2324B)
1 +++ 2 date = 'Thu Mar 17 17:30:23 2022' 3 draft = false 4 title = 'Sprig Arbor Chat Client' 5 description = "Arbor Chat client in Go." 6 authors = ["Jack Mordaunt"] 7 tags = ["Go", "Gio", "Native", "Portfolio"] 8 categories = ["development"] 9 +++ 10 11 <style> 12 .carousel { 13 display: flex; 14 overflow: scroll; 15 } 16 </style> 17 18 <div class="carousel"> 19 <img src="/images/sprig/sprig.webp" alt="Sprig" /> 20 </div> 21 22 ## Overview 23 24 Built by [~whereswaldon](https://git.sr.ht/~whereswaldon), [Sprig](https://git.sr.ht/~whereswaldon/sprig) is a client for [Arbor](https://man.sr.ht/~whereswaldon/arborchat), an open source federated chat platform. 25 Sprig is a cross-platform client supporting Windows, macOS, Linux, Android, and iOS. 26 It's written in **Go**, using the [**Gio**](https://git.sr.ht/~eliasnaur/gio) immediate-mode UI toolkit. 27 28 --- 29 30 ### My Role 31 32 When I joined, Sprig stored each chat message as an individual file on disk. This file-per-message model worked reasonably well on Linux, but resulted in **severely degraded performance** on Windows, where reading thousands of tiny files led to **notably slow startup times**. 33 34 To address this, I migrated the persistence layer from the filesystem to [**BoltDB**](https://github.com/boltdb/bolt), an embedded key-value store written in Go. This upgrade significantly improved startup performance across all platforms, with the largest gains on Windows. 35 36 In addition to this core performance enhancement, I contributed minor UI improvements and refinements. 37 38 --- 39 40 ### Result 41 42 The app now launches significantly faster, offers a smoother user experience, and maintains cross-platform compatibility—all without sacrificing the simplicity of a local-first storage model. 43 44 ### Platforms 45 46 <div style="display: flex; flex-wrap: wrap; gap: 2rem;"> 47 <i class="fa-4x fa-brands fa-windows"></i> 48 <i class="fa-4x fa-brands fa-apple"></i> 49 <i class="fa-4x fa-brands fa-linux"></i> 50 <i class="fa-4x fa-brands fa-android"></i> 51 </div> 52 53 ### Languages 54 55 <div style="display: flex; flex-wrap: wrap; gap: 2rem;"> 56 <img style="max-height: 100px;" src="/images/brands/go.svg"/> 57 </div> 58 59 ### Tech 60 61 <div style="display: flex; flex-wrap: wrap; gap: 2rem;"> 62 <img style="max-height: 100px;" src="/images/brands/gio.svg" class="invert-me"/> 63 <img style="max-height: 100px;" src="/images/brands/boltdb.webp"/> 64 </div> 65