This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-17
Channels
- # announcements (2)
- # asami (3)
- # babashka (30)
- # beginners (23)
- # calva (28)
- # cider (3)
- # clj-kondo (16)
- # clj-on-windows (7)
- # cljs-dev (7)
- # clojure (47)
- # clojure-austin (3)
- # clojure-europe (25)
- # clojure-gamedev (3)
- # clojure-greece (1)
- # clojure-nl (1)
- # clojure-uk (3)
- # clojurescript (54)
- # community-development (24)
- # conjure (16)
- # duct (1)
- # emacs (8)
- # events (1)
- # figwheel-main (4)
- # fulcro (13)
- # gratitude (20)
- # helix (3)
- # honeysql (8)
- # hyperfiddle (12)
- # introduce-yourself (1)
- # jobs (6)
- # lambdaisland (1)
- # lsp (23)
- # malli (1)
- # meander (27)
- # minecraft (11)
- # off-topic (12)
- # pathom (1)
- # portal (11)
- # releases (1)
- # remote-jobs (1)
- # ring (11)
- # sci (1)
- # shadow-cljs (53)
- # specter (5)
- # xtdb (20)
Turns out clojure.core/satisfies?
is really inefficient, and I'm using it all over the place š , but it's easy enough to cache
this new version also allows the :material
in a cursor to be a function that returns a material
About perf, is there a recommended way to change lots of blocks at a time? I crashed the server more times than I would like to admit š
Yeah you can't lock up the server thread for too long... this might be better now with these recent improvements, depending on how much work witchcraft is doing to calculate the blocks.
otherwise what you can do is
⢠wrap your code in future
(or similar, take it off the rendering thread)
⢠chunk up your total amount of blocks and draw them in batches
⢠then you have to make sure any witchcraft/bukkit operations are wrapped in wc/run-task
so they are scheduled on the server thread again
(future
(doseq [batch (partition 1000 many-blocks)]
(wc/run-task #(wc/set-blocks batch))))
I still haven't really figured out a good way to bulk change blocks in paper, for Glowstone we have a separate optimized codepath for this... for paper I haven't been able to find something like that. There's some good stuff in WorldEdit but then we'd have to add that as an extra dependency, and also haven't really figured out yet how to use it.