And do 5 big queries instead of hundreds of smaller ones.
For example, a README.ciro document that references another document saying:
The \x[speed-of-light] is fast.
needs to fetch "speed-of-light" from the ID database (previously populated e.g. by preparsing light.ciro:
= Light

== Speed of light
to decide that it should display as "Speed of light" (the title rather than the ID).
Previously, I was doing a separate fetch for each \x[] as they were needed, leading to hundreds of them at different times.
Now I refactored things so that I do very few database queries, but large ones that fetch everything during parsing. And then at render time they are all ready in cache.
This will be fundamental for the live preview on the browser, where the roundtrip to server would make it impossible
E.g.:
README.ciro
= My website

== h2

\Include[not-readme]
not-readme.ciro
= Not readme

== Not readme h2
the table of contents for index.html also contains the headers for not-readme.ciro producing:
  • My website
    • h2
      • Not readme
        • Not readme h2
This feature means that you can split large input files if rendering starts to slow you down, and things will still render exactly the same, with the larger table of contents.
This will be especially important for the website because initially I want users to be able to edit one header at a time, and join all headers with \Include. But I still want the ToC to show those children.
This was a bit hard because it required doing RECURSIVE SQL queries, something I hadn't done before: stackoverflow.com/questions/192220/what-is-the-most-efficient-elegant-way-to-parse-a-flat-table-into-a-tree/192462#192462 + of course the usual refactor a bunch of stuff and fix tests until you go mad.
github.com/cirosantilli/node-express-sequelize-nextjs-realworld-example-app contains the same baseline tech as OurBigBook, and I have been use to quickly test/benchmark new concepts for the website base.
I'm almost proud about that project, as a reasonable template for a Next.js project. It is not perfect, notably see issues on the issue tracker, but it it quite reasonable.
The side effects of ambitious goals are often the most valuable thing achieved once again? I to actually make the project be more important thatn the side effects this time, but we'll see.
Since the last update, I've made some major improvements to the baseline tech of the website, which I'll move little by little into OurBigBook. Some of the improvements actually started in OurBigBook.com. The improvements were:

Articles by others on the same topic (0)

There are currently no matching articles.