Page 1 of 1

Angular Designer UpdateImagesArray Cache

Posted: Sun Jan 17, 2021 4:17 pm
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);
  }

Re: Angular Designer UpdateImagesArray Cache

Posted: Tue Jan 19, 2021 12:00 am
by Lech Kulikowski
Hello,

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

Thank you.

Re: Angular Designer UpdateImagesArray Cache

Posted: Tue Jan 19, 2021 3:02 am
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)

Re: Angular Designer UpdateImagesArray Cache

Posted: Thu Jan 21, 2021 9:05 pm
by Lech Kulikowski
Hello,

Ok, we will wait.

Re: Angular Designer UpdateImagesArray Cache

Posted: Sat Jan 23, 2021 10:28 pm
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 10518 times
exceptions.PNG
exceptions.PNG (64.42 KiB) Viewed 10518 times

Re: Angular Designer UpdateImagesArray Cache

Posted: Wed Jan 27, 2021 8:39 am
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.

Re: Angular Designer UpdateImagesArray Cache

Posted: Wed Jan 27, 2021 11:50 am
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?

Re: Angular Designer UpdateImagesArray Cache

Posted: Mon Feb 01, 2021 8:25 pm
by Lech Kulikowski
Hello,

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

Thank you.