search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Daypilot angular bundle size

Asked by Hicham el Allouchi
3 months ago.

Hi there!

I little question about the bundle size of daypilot when working with Angular 12.
Atm I am building an application were we use daypilot on 1 single page.

The problem however is that daypilot is around 84% of that bundle. (see screenshot)

I was wondering if there is anything I could do to reduce the bundle size of daypilot?

Answer posted by Dan Letecky [DayPilot]
3 months ago.

Unfortunately, the package size can't be reduced.

We recommend the following to improve the loading time:

  • make sure the bundle is served compressed (in your screenshot, you can see that the gzipped size is 213 KB which is a size of one image)
  • enable proper client-side caching (you can cache forever since the bundle name is always unique)
  • serve the JavaScript from a CDN

These steps will reduce the loading time to 50-60ms during the initial load and to 0ms during subsequent loads.

If you only use DayPilot in a part of your application you may also consider using Angular lazy loading for the respective module. In that case, the library will only be loaded when needed:

https://angular.io/guide/lazy-loading-ngmodules

Comment posted by Dan Letecky [DayPilot]
2 months ago.

There is now a new tutorial available that shows how to implement module lazy loading:
https://code.daypilot.org/47103/improve-angular-scheduler-performance-lazy-loading-code-splitting

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.