Base solution for your next web application
Open Closed

Reduce app size and optimize #7900


User avatar
0
daws created

Our application is pretty big (15MB) and we would like to reduce its size. One of the things we can do is to remove the biggest unused packages.

With webpack-bundle-analyzer, we determined that the following packages are quite big :

  • All separate momentjs locales
  • momentjs min with locales
  • moment timezone
  • quill

Q1. Is it necessary to keep both momentjs AND momentjs-min ? Q2. We'd like to include only locales we need. In order to do that, we tried moment-locales-webpack-plugin + ngx-build-plus but it doesn't work on our code (even on a freshly downloaded template). Any recommendation to make it work ? Our current workaround is to replace moment locale folder with a custom locale folder post build but it's not super clean. ~~Q3. Can we safely remove quill without breaking abp features ?~~ EDIT: I just found out that someone in the team needs the primeng editor, which is based on quill, so forget about this one. Q4. How can we adjust the Web.Host server log to know which request completed in how much time ? (example : "Request finished in xx ms (<REQUEST_NAME>)"). This would help us identify which backend requests need optimization.

Our project is on aspnetzero 7.2.3, with asp.net core & angular .net framework 4.6.1


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Q1: Only one of momentjs or momentjs-min should be used.
    Q2: I'm not sure how to do it at the moment. Q4: You can check audit logs table to measure that.

    Could you create an issue on GitHub about this ? We would like to make some enhancements about reducing the bundle size in Angular app according to your suggestions.

    Thanks,

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because it has not had recent activity for a long time.