Reputation: 3976
Does bundling (.js and .css) happen for each request? Or they will be created one time and cached for next requests?
When does it create?
Any affect on server CPU usage?
Upvotes: 0
Views: 969
Reputation: 7243
Bundles are cached. Here is the reference where it is said. Obviously, they are built only once per set of files.
Further, according to my own experience, when I simply replace files in the server, bundle gets rebuilt, which allows us to assume that cache is dependent on file system.
Finally, having stuff cached, we reduce the load on hardware.
Bundling is primarily HDD and RAM task, thus, CPU is not heavily involved. You may even think that CPU is out of this process. Of course if you have bundles that end up to 1 GB javascript file, you will notice some performance shifts on a server side.
If you have a 1 GB Javascript file, you have other issues.
Upvotes: 2