Angular Designer UpdateImagesArray Cache

Stimulsoft Reports.ANGULAR discussion
Post Reply
anjung
Posts: 11
Joined: Sun Nov 15, 2020 12:10 pm

Angular Designer UpdateImagesArray Cache

Post by anjung »

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.

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);
  }
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Angular Designer UpdateImagesArray Cache

Post by Lech Kulikowski »

Hello,

Please send us a sample project that reproduces the issue for analysis.

Thank you.
anjung
Posts: 11
Joined: Sun Nov 15, 2020 12:10 pm

Re: Angular Designer UpdateImagesArray Cache

Post by anjung »

Will do, however this will take a few days probably.

I'd suspect some sort of thread resource blocking within the aspnetcore requests.
the first designer event is instant and the following block for 30s or so

the c# code for razor and angular is nearly the same
angular is fully async implemneted and razor is not (yet)
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Angular Designer UpdateImagesArray Cache

Post by Lech Kulikowski »

Hello,

Ok, we will wait.
anjung
Posts: 11
Joined: Sun Nov 15, 2020 12:10 pm

Re: Angular Designer UpdateImagesArray Cache

Post by anjung »

https://github.com/coronabytes/stimulsoft
It uses MemoryCache for DB Abstraction

There may be a better way to do the resizing?
Pls look over the AngularController if there comes anything to mind what could cause aspnetcore to block - its taken from your examples hoever

When resizing the angular variant this happens:
a single resize spams the 2.7 MB UpdatesImagesArrays and causes kestrel throw some exceptions, which are handled internally however
requests.PNG
requests.PNG (112.75 KiB) Viewed 10412 times
exceptions.PNG
exceptions.PNG (64.42 KiB) Viewed 10412 times
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Angular Designer UpdateImagesArray Cache

Post by Lech Kulikowski »

Hello,

Thank you for the sample.
We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
anjung
Posts: 11
Joined: Sun Nov 15, 2020 12:10 pm

Re: Angular Designer UpdateImagesArray Cache

Post by anjung »

Hi,

No problem the Razor variant works for now as it should.
One of the Kestrel exceptions seems to be caused by stimulsoft accessing request session - when sessions support is not enabled.
ObjectCache should not require session?
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Angular Designer UpdateImagesArray Cache

Post by Lech Kulikowski »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
Post Reply