Digging in the aiohttp_jinja2 code, I did not find an asynchronous rendering template anywhere. It turns out aiohttp_jinja2 implements only the add-on for aiohttp. And the asynchronous render itself?

And if aiohttp_jinja2 does not implement an asynchronous render, is it possible to make it in some other way?

And how does a synchronous rendering with aiohttp_jinja2 affect performance in this case?

  • one
    Compared to the length of I / O operations, template rendering is instantaneous. Therefore, it will not affect performance and it is not necessary to make it asynchronous. - Sergey Gornostaev
  • @Sergey, thanks! - user203925

1 answer 1

Generating html from templates is most likely limited by the CPU, not by IO and the typical amount of work is not sufficient to ship to the process pool ( run_in_executor() ) for asynchronous execution.