mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 19:17:13 -05:00 
			
		
		
		
	Fix: resolve cpu usage due to incorrect interval use (#8884)
This commit is contained in:
		
							parent
							
								
									2c28348b56
								
							
						
					
					
						commit
						6c34e37838
					
				@ -13,6 +13,7 @@ import {
 | 
				
			|||||||
  NgbTooltipModule,
 | 
					  NgbTooltipModule,
 | 
				
			||||||
} from '@ng-bootstrap/ng-bootstrap'
 | 
					} from '@ng-bootstrap/ng-bootstrap'
 | 
				
			||||||
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
 | 
					import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
 | 
				
			||||||
 | 
					import { delay, of } from 'rxjs'
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  DEFAULT_DISPLAY_FIELDS,
 | 
					  DEFAULT_DISPLAY_FIELDS,
 | 
				
			||||||
  DisplayField,
 | 
					  DisplayField,
 | 
				
			||||||
@ -104,9 +105,11 @@ export class DocumentCardLargeComponent
 | 
				
			|||||||
  popoverHidden = true
 | 
					  popoverHidden = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ngAfterViewInit(): void {
 | 
					  ngAfterViewInit(): void {
 | 
				
			||||||
    setInterval(() => {
 | 
					    of(true)
 | 
				
			||||||
 | 
					      .pipe(delay(50))
 | 
				
			||||||
 | 
					      .subscribe(() => {
 | 
				
			||||||
        this.show = true
 | 
					        this.show = true
 | 
				
			||||||
    }, 100)
 | 
					      })
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  get searchScoreClass() {
 | 
					  get searchScoreClass() {
 | 
				
			||||||
 | 
				
			|||||||
@ -13,7 +13,8 @@ import {
 | 
				
			|||||||
  NgbTooltipModule,
 | 
					  NgbTooltipModule,
 | 
				
			||||||
} from '@ng-bootstrap/ng-bootstrap'
 | 
					} from '@ng-bootstrap/ng-bootstrap'
 | 
				
			||||||
import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
 | 
					import { NgxBootstrapIconsModule } from 'ngx-bootstrap-icons'
 | 
				
			||||||
import { map } from 'rxjs/operators'
 | 
					import { of } from 'rxjs'
 | 
				
			||||||
 | 
					import { delay, map } from 'rxjs/operators'
 | 
				
			||||||
import {
 | 
					import {
 | 
				
			||||||
  DEFAULT_DISPLAY_FIELDS,
 | 
					  DEFAULT_DISPLAY_FIELDS,
 | 
				
			||||||
  DisplayField,
 | 
					  DisplayField,
 | 
				
			||||||
@ -97,9 +98,11 @@ export class DocumentCardSmallComponent
 | 
				
			|||||||
  @ViewChild('popupPreview') popupPreview: PreviewPopupComponent
 | 
					  @ViewChild('popupPreview') popupPreview: PreviewPopupComponent
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ngAfterViewInit(): void {
 | 
					  ngAfterViewInit(): void {
 | 
				
			||||||
    setInterval(() => {
 | 
					    of(true)
 | 
				
			||||||
 | 
					      .pipe(delay(50))
 | 
				
			||||||
 | 
					      .subscribe(() => {
 | 
				
			||||||
        this.show = true
 | 
					        this.show = true
 | 
				
			||||||
    }, 50)
 | 
					      })
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  getIsThumbInverted() {
 | 
					  getIsThumbInverted() {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user