Size of Kendo download

3 posts, 0 answers
  1. Ed
    Ed avatar
    2 posts
    Member since:
    Jul 2019

    Posted 11 Mar Link to this post

    Plea for help:  Our front end guy left, and I've inherited his work :(   I like the JS stuff, but I'm no expert.

    Our new app has about a 4 megabyte app.js download, even when minified.  We've turned on gzip compression on the server, and that gets it down to a bit over a meg, but we had a $1000 bandwidth overage last month!

    I've been tasked with seeing if we are including unused code. 

    So, my question:  In the docs I see this: 

    // As an alternative, you could import only the scripts that are used by the utility:
    // import '@progress/kendo-ui/js/kendo.data' // Imports only the DataSource script and its dependencies
     
    import '@progress/kendo-theme-default/dist/all.css'
     
    import { DataSource,
            HierarchicalDataSource,
            GanttDataSource,
            GanttDependencyDataSource,
            PivotDataSource,
            SchedulerDataSource,
            TreeListDataSource,
            DataSourceInstaller } from '@progress/kendo-datasource-vue-wrapper'
     
    Vue.use(DataSourceInstaller)
     
    new Vue({
       el: '#app',
       components: {
           DataSource,
            HierarchicalDataSource,
            GanttDataSource,
            GanttDependencyDataSource,
            PivotDataSource,
            SchedulerDataSource,
            TreeListDataSource,
            DatasourceInstaller
       }
    })

     

    I've got about six of these:  layout, dateinputs, inputs, dropdowns, dialog, etc.  

    If I can identify which of the features I need from each I need from each "wrapper", can I cut this down?  For instance, I'm sure we don't use gantt charts or pivots above.

    Thanks, 

    Ed Greenberg

  2. Martin
    Admin
    Martin avatar
    198 posts

    Posted 13 Mar Link to this post

    Hello Ed,

    You can safely leave out the code for the widgets you do not use by importing only the ones you need. Please refer to our Script Size Optimization article for further information. You can also build a custom bundle ( kendo.custom.min.js file ) which includes the scripts you wish.

    Let me know if the above information was helpful, or if you have any further questions.

    Regards,
    Martin
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Ed
    Ed avatar
    2 posts
    Member since:
    Jul 2019

    Posted 13 Mar in reply to Martin Link to this post

    Thank you. We're going to work through understanding this :)  
Back to Top