Performance disclaimer

Created on 23 August 2023, 10 months ago
Updated 13 September 2023, 10 months ago

If you are thinking about using this module, you should be aware of the impact it will have on page response time.

The tailwindcss executable is simply too slow to be used at runtime. To illustrate, try timing the tailwindcss command in the terminal:

$ time npx tailwindcss

tailwindcss v3.3.3

...

real    0m0.934s
user    0m0.934s
sys     0m0.134s

As you can see, the command takes nearly 1 second to complete, and that is without even compiling anything.

The standalone executable is a bit better, since npx is not involved:

$ time ./tailwindcss-linux-x64 

tailwindcss v3.3.3

...

real    0m0.547s
user    0m0.545s
sys     0m0.113s

However, at over 500ms it is still a significant overhead.

Given that the response time of a typical Drupal page can be under 100ms, the approach taken by this module has significant performance impact.

I think it would be best to include a disclaimer in the module description to warn potential users about this.

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Documentation

Created by

πŸ‡­πŸ‡°Hong Kong phparkle

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024