Angular Designer UpdateImagesArray Cache
Posted: Sun Jan 17, 2021 4:17 pm
Hi,
On initital load 2.7MB base64 encoded images are transfered THREE TIMES and once every designer resize (to make it responsive we had to bind [height] to container height)
Isnt' there a better way to do this like copy to /assets or cache them locally?
loading times are quite heavy
UPDATE:
Had to toss the angular implemantation and use iframe + razor view.
Report Designer loading times exceeded 70s when the "old" way is like 1s.
On initital load 2.7MB base64 encoded images are transfered THREE TIMES and once every designer resize (to make it responsive we had to bind [height] to container height)
Isnt' there a better way to do this like copy to /assets or cache them locally?
loading times are quite heavy
UPDATE:
Had to toss the angular implemantation and use iframe + razor view.
Report Designer loading times exceeded 70s when the "old" way is like 1s.
Code: Select all
<div container-content class="d-flex flex-grow-1 core-flex-host">
<div class="core-flex-fix" #host (window:resize)="updateHeight(host.clientHeight)">
<stimulsoft-designer-angular (designerLoaded)="updateHeight(host.clientHeight)"
[requestUrl]="'/api/designer?template='+ '4f775f23-debf-4ea8-837e-15dbb299af61'"
width="100%" [height]="clientHeight | async">
</stimulsoft-designer-angular>
</div>
</div>
Code: Select all
clientHeight = new BehaviorSubject<string>('80vh');
@ViewChild('host')
host: ElementRef;
constructor(public app: AppService) { }
ngOnInit(): void {
}
updateHeight(height: any): void {
if (height !== 0 && height !== undefined) {
if (this.clientHeight.value !== height + 'px') {
this.clientHeight.next(height + 'px');
}
}
}
ngAfterViewInit(): void {
this.updateHeight(this.host.nativeElement.clientHeight);
}