bountonw / translate-tooling

MIT License
2 stars 0 forks source link

Separate InDesign and pdf builds to only update when needed #46

Closed bountonw closed 2 months ago

bountonw commented 3 months ago

Currently, a minor change to one file initiates a 5+ minute build cycle where all pdfs are rebuilt. Can we separate this out so that only .tooling triggers a major rebuild, otherwise only books are rebuilt when changes to that book are made.

bountonw commented 2 months ago

@mattleff This is probably not top priority. But currently we are building all Thai books with both pdf and InDesign files every time there is a PR. We have 5 PP books, LBF, and MB that are all rebuilt each time. Sometimes the builds take 5+ minutes to finish. If we could only rebuild when the book we are working for or .tooling is updated, that would save 5+ minutes a day and more importantly, save being distracted. (What happens is that I get up because I don't want to wait and then 5+ minutes ends up being 20 or 30 minutes.)

mattleff commented 2 months ago

@bountonw Ok, so there's two issues here:

  1. Optimizing the actions so that only the necessary PDFs are rebuilt: This is a good efficiency improvement, but currently all the books are built in parallel on separate instances so fixing this won't decrease wall time. (In other words, even if only LBF was rebuilt when a typo was fixed in LBF it would still take ~5min to build the LBF PDFs...)
  2. Speeding up PDF generation: I'm not sure why it takes so long to render the PDFs with Latex. I think I mentioned that I tried out a web engine-based PDF rendering tool a couple weeks ago. One of the things that I noticed is that it generated PDFs super fast. I was only trying out a proof-of-concept, so it's not a real comparison. Maybe once I added all the features that we're currently using in our PDFs the rendering time would be similar. But when I find some time (🙃) I'd like to compare replacing XeLaTeX with Paged.js and see if the quality is there for us. We could still use Pandoc and Tex as an intermediate transforming step before converting the Tex to HTML to render with Paged.js, so the word-breaking could be the same. I'll need to figure out how to add headers and footers and page numbers and some of the other PDF features that we're getting from XeLaTeX right now before we could swap it out.
bountonw commented 2 months ago

Most of my work is in PP. But I am having to wait for LBF to render when making a change to a PP book. Again, this isn't top priority. Having an in house way of type setting that doesn't depend on adobe is more important. I am not able to share what is completed and ready to share in either Thai or Lao. Having a per chapter build wouldn't even be bad. That would reduce the build and we would only be dealing with the chapters that are updating. I wouldn't mind waiting for a build so much if I was only waiting for what I needed and not the entire system.