Performance Improvements and Some Polish (#1702)

* Auto scale reading timeline

* Added benchmarks for SharpImage and NetVips. When an epub has a malformed page, catch the error and present it better to the user.

* Added a hint for an upcoming feature

* Slightly sped up word count for epubs

* Added one more test to reflect actual code.

* Some light cleanup

* Use compact number for stat lists

* Fixed brightness being broken on manga reader

* Replaced CoverToWebP SharpImage version with NetVips which is MUCH lighter on memory and CPU.

* Added last modified on the progress dto for CdDisplayEx.

* Code cleanup

* Forgot one cleanup
This commit is contained in:
Joe Milazzo 2022-12-17 09:07:30 -06:00 committed by GitHub
parent d1596c4ab7
commit b62d340bb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 192 additions and 123 deletions

View file

@ -32,4 +32,7 @@
<button type="submit" class="flex-fill btn btn-primary" (click)="saveSettings()" [disabled]="!settingsForm.dirty">Save</button>
</div>
</form>
<!-- Accordion with Issues from Media anaysis -->
</div>

View file

@ -349,7 +349,7 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {
}
get SplitIconClass() {
// NOTE: This could be rewritten to valueChanges.pipe(map()) and | async in the UI instead of the getter
// TODO: make this a pipe
if (this.mangaReaderService.isSplitLeftToRight(this.pageSplitOption)) {
return 'left-side';
} else if (this.mangaReaderService.isNoSplit(this.pageSplitOption)) {
@ -593,7 +593,7 @@ export class MangaReaderComponent implements OnInit, AfterViewInit, OnDestroy {
pageSplit: parseInt(this.generalSettingsForm.get('pageSplitOption')?.value, 10),
fitting: (this.generalSettingsForm.get('fittingOption')?.value as FITTING_OPTION),
layoutMode: this.layoutMode,
darkness: 100,
darkness: parseInt(this.generalSettingsForm.get('darkness')?.value + '', 10) || 100,
pagingDirection: this.pagingDirection,
readerMode: this.readerMode,
emulateBook: this.generalSettingsForm.get('emulateBook')?.value,

View file

@ -1,7 +1,6 @@
<div class="row g-0 mb-2">
<div class="col-8">
<h4><span>Publication Status</span>
<i class="fa fa-info-circle ms-1" aria-hidden="true" placement="right" [ngbTooltip]="tooltip" role="button" tabindex="0"></i>
</h4>
</div>
<div class="col-4">
@ -14,8 +13,6 @@
</div>
</div>
<ng-template #tooltip></ng-template>
<ng-container *ngIf="publicationStatues$ | async as statuses">
<ng-container *ngIf="formControl.value; else tableLayout">

View file

@ -30,8 +30,9 @@
[showGridLines]="false"
[showRefLines]="true"
[roundDomains]="true"
[autoScale]="true"
xAxisLabel="Time"
yAxisLabel="Reading Events"
yAxisLabel="Reading Activity"
[timeline]="false"
[results]="data"
>

View file

@ -9,7 +9,7 @@
<ng-container *ngIf="image && image(item) as url">
<app-image *ngIf="url && url.length > 0" width="32px" maxHeight="32px" class="img-top me-1" [imageUrl]="url"></app-image>
</ng-container>
{{item.name}} <span class="float-end" *ngIf="item.value >= 0">{{item.value}} {{label}}</span>
{{item.name}} <span class="float-end" *ngIf="item.value >= 0">{{item.value | compactNumber}} {{label}}</span>
</li>
</ul>
</div>