Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Stefano Marinelli
Stefano Marinelli
@stefano@mastodon.bsd.cafe  ·  activity timestamp 2 days ago

I'm testing the new BSSG test build. I've been working on it for a while to refactor the build process and move it entirely to RAM (optionally, for now).
On my OpenBSD Amsterdam VPS (single core, spinning drives), build times are cut down to less than a third of the last release, and on other devices it takes about half the time, with zero I/O.

The current caching system isn't exactly rock-solid, and personally, I prefer a faster full build over maintaining all that complexity.

I'll probably upload everything as soon as I've ironed out a couple of bugs, in the coming days.

#BSSG #SSG #Bash #StaticSiteGenerator

  • Copy link
  • Flag this post
  • Block
fcalva
fcalva
@fcalva@cyberplace.social replied  ·  activity timestamp 2 days ago

@stefano How are you doing that in Bash ? Pipes ? Ramdisks ?

  • Copy link
  • Flag this comment
  • Block
Stefano Marinelli
Stefano Marinelli
@stefano@mastodon.bsd.cafe replied  ·  activity timestamp 2 days ago

@fcalva Not a tmpfs/ramdisk trick. This wouln't be portable. In ram mode I preload posts/pages/templates/locale once into process memory (mainly Bash associative arrays), then keep indexes and caches in memory too (file index, tags/authors/archive maps, related posts, RSS metadata). The build reads from those in-memory structures instead of doing intermediate cache I/O on disk.
Only the final generated site is written to disk. So yes: mostly Bash arrays + in-memory shell processing (awk/sed), which is why it speeds up builds a lot on slow disks.

  • Copy link
  • Flag this comment
  • Block
fcalva
fcalva
@fcalva@cyberplace.social replied  ·  activity timestamp 2 days ago

@stefano Wow, i still have a lot to learn about Bash. Didn't even know there were data structures !

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.7 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct