Auto-generate all files when using project server?
#38
Open
opened 5 years ago by Macavirus
·
4 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Running the pollen dev server doesn’t seem to actually generate any files
until you click on them through the menu. I would expect that this would
generate all files just as
raco pollen publish
does. It would make sense togenerate all of the files so that they can all be worked on iteratively (e.g.,
if pollen is just one step in a larger publishing pipeline) but
maybe there are performance reasons not to do this?
For reference, I’m using:
raco pollen start
probably should not generate any file. For big projects, generating files will take a lot of time, and the file that you request to render need to wait for the generations to complete first. If you wish to generate all files, useraco pollen render
.It might be possible to have a background process that generates all files when the system is idle and gives priority to requests from users, but this feature doesn't currently exist in Pollen.
Have you looked at using
raco pollen setup
to preheat the cache?The Pollen project server is “lazy” in the sense that it doesn’t render anything until it needs to (because as @sorawee says, the costs are unknown). But it maintains a disk cache as you use the project server that persists between sessions. If you start the project server as you suggest:
raco pollen reset && raco pollen start
You will be erasing that disk cache (with
reset
) and losing that benefit.As noted above, you can use
raco pollen setup
to partially populate the disk cache orraco pollen render
to completely populate it. If you useraco pollen start
immediately after these commands, your server session will be snappier. But if you don’t, you’re no worse off — all the same files will have to be generated and cached during the server session.Thanks everyone for the pointers. I understand the unknown costs part is a good concern as there are surely some complicated builds going on! It looks like using a combination of
raco pollen render
and potentially running it in combination withinotify
could meet my needs.