I'm having performace issues over bundle size.
1. Either the gridview or the pivotview reference pdf-export, while the PdfExportService was never imported.
2. Spreadsheet adds Ribbon and Edit, while niether of the respective service was imported.
3. can scheduler add an EditService to split ej2-calendars reference?
4. Can node_modules/@syncfusion/ej2-spreadsheet/styles/spreadsheet/all.scss split the ribbon related style? It makes styles larger.
5. rich-text-editor exports Image and Table, while the respective service never imported.
6. ej2-inputs is included, while never imported.
7. ej2-filemanager
is included, while never imported.
There are few smaller examples, but these are the main.
"dependencies": {
"@syncfusion/ej2": "^19.2.55",
"@syncfusion/ej2-angular-charts": "^19.2.55",
"@syncfusion/ej2-angular-circulargauge": "^19.2.55",
"@syncfusion/ej2-angular-diagrams": "^19.2.55",
"@syncfusion/ej2-angular-grids": "^19.2.55",
"@syncfusion/ej2-angular-kanban": "^19.2.55",
"@syncfusion/ej2-angular-layouts": "^19.2.55",
"@syncfusion/ej2-angular-pivotview": "^19.2.55",
"@syncfusion/ej2-angular-richtexteditor": "^19.2.55",
"@syncfusion/ej2-angular-schedule": "^19.2.55",
"@syncfusion/ej2-angular-spreadsheet": "^19.2.55",
"@syncfusion/ej2-base": "^19.2.55"
}
Imports:
import {
ExcelExportService, GridModule, PagerModule, AggregateService, FreezeService,
GroupService, PageService, ResizeService, SortService, SelectionService
} from '@syncfusion/ej2-angular-grids';
import {
ChartModule, LineSeriesService, ScatterSeriesService, ColumnSeriesService, SplineSeriesService,
SplineAreaSeriesService, StripLineService, AreaSeriesService, ScrollBarService, StepLineSeriesService,
StepAreaSeriesService, StackingColumnSeriesService, StackingLineSeriesService, StackingAreaSeriesService,
BarSeriesService, StackingBarSeriesService, RangeColumnSeriesService, BubbleSeriesService, TooltipService,
CrosshairService, CategoryService, DateTimeService, LogarithmicService, LegendService, ZoomService, DataLabelService,
SelectionService, ChartAnnotationService, WaterfallSeriesService,
RangeAreaSeriesService, PolarSeriesService, RadarSeriesService, DateTimeCategoryService,
MultiLevelLabelService, ParetoSeriesService, TooltipRenderService,
ExportService,
AccumulationChartAllModule, AccumulationAnnotationService, AccumulationDataLabelService, AccumulationLegendService, AccumulationSelectionService, AccumulationTooltipService
} from '@syncfusion/ej2-angular-charts';
import { PivotViewModule, ExcelExportService, GroupingBarService, NumberFormattingService, GroupingService, PivotChartService, ConditionalFormattingService } from '@syncfusion/ej2-angular-pivotview';
import { CircularGaugeModule, AnnotationsService, GaugeTooltipService, LegendService } from '@syncfusion/ej2-angular-circulargauge';
import { DiagramModule, ConnectorBridgingService, LineRoutingService, ComplexHierarchicalTreeService, BpmnDiagramsService, LayoutAnimationService, UndoRedoService, SnappingService, ConnectorEditingService, SymbolPaletteModule } from '@syncfusion/ej2-angular-diagrams';
import { ScheduleModule, DayService, WorkWeekService, MonthService, MonthAgendaService, ICalendarExportService, AgendaService, YearService } from '@syncfusion/ej2-angular-schedule';
import { SpreadsheetModule, SelectionService, BasicModuleService, ClipboardService, CellFormatService, KeyboardNavigationService, KeyboardShortcutService, NumberFormatService } from '@syncfusion/ej2-angular-spreadsheet';
7. ej2-filemanager
8. ej2-dropdowns
9. ej2-popups
10. Can kanban split dialog into EditService?
I too think that the syncfusion size is just extreme. I found out while trying to reduce bundle size.
In the provided screenshot you can even see that the syncfusion stuff is bigger than the angular stuff, just crazy.
And I'm mostly only using grid, treegrid, and dropdown (some others are slightly used).
On the screenshot you can also see that there is a lot of stuff used that I did not clearly inject or use on any of the grids or treegrids like the pdf export or the navigations.
Any suggestion of how to reduce the exccessive syncfusion size?
Sadly there is a 100kb limit for an image, thats way too little and also the file browser does not accept jpg or png (wtf?).
|
For ng build |
For ng build --prod |
|
|
|
|
import { Component } from '@angular/core';
import { ToolbarService, LinkService, ImageService, TableService,HtmlEditorService } from '@syncfusion/ej2-angular-richtexteditor';
@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
providers: [ToolbarService, TableService, LinkService, ImageService, HtmlEditorService]
})
export class AppComponent {
} |
hi,
Thank you for the elaborated reply.
Quick notes:
EditService not added.
The Syncfusion Angular documentation states components can be used by loading only the necessary modules and services. You have for example ChartModule and ChartAllModule, StepSeriesService, etc.
Is it not relevant? Does some of the packages ignore it?
The Chart component behaves this way. The other large packages here - does not.
as I wrote above, I'm not using file-manager, or pdf-export. Other components as scheduler does'nt import edit service. and yet - these consume considerable size in the build. My requirment from all components is readonly, so inputs, dialog, drop-down-list, time-picker - are never referenced.
thanks,
The bundle size is (minimized) is currently ~13mb, of which ~62% is syncfusion. Code in my view should be able to drop unsed functions and classes by tree-shacker.
Same with scss, 1.2mb of which 600kb+. I suggest dividing scss to more focused parts.
T
Hi,
I'm usnig the following:
"@syncfusion/ej2-angular-charts": "^19.3.45",
"@syncfusion/ej2-angular-circulargauge": "^19.3.44",
"@syncfusion/ej2-angular-diagrams": "^19.3.45",
"@syncfusion/ej2-angular-gantt": "^19.3.45",
"@syncfusion/ej2-angular-grids": "^19.3.45",
"@syncfusion/ej2-angular-kanban": "^19.3.45",
"@syncfusion/ej2-angular-pivotview": "^19.3.44",
"@syncfusion/ej2-angular-richtexteditor": "^19.3.45",
"@syncfusion/ej2-angular-schedule": "^19.3.44",
"@syncfusion/ej2-angular-spreadsheet": "^19.3.45",
Thanks
Hi Barak,
Thanks for your reply.
We will check the listed component from our end and get back to you on October 25 2021.
Regards,
Mydeen S N