mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
reduce maps loading by 40% from micro optimization
This commit is contained in:
@@ -51,7 +51,6 @@ export function FilterPanel({className, ref, playlist = false, filter, onChange,
|
||||
firstRun.current = false;
|
||||
return;
|
||||
}
|
||||
console.log(filter, firstFilter);
|
||||
setHaveChanged(() => !equal(filter, firstFilter));
|
||||
}, [filter])
|
||||
|
||||
|
||||
@@ -117,7 +117,6 @@ export const LocalMapsListPanel = forwardRef(({version, className, filter, searc
|
||||
const loadMapsObs$ = mapsManager.getMaps(version);
|
||||
|
||||
loadMapsObs$.pipe(map(progess => {
|
||||
console.log(progess);
|
||||
return Math.floor(((progess.loaded / progess.total) * 100));
|
||||
})).subscribe(percent => loadPercent$.next(percent));
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ export function VersionViewer() {
|
||||
const [currentTabIndex, setCurrentTabIndex] = useState(0);
|
||||
|
||||
const navigateToVersion = (version?: BSVersion) => {
|
||||
console.log(version);
|
||||
if(!version){
|
||||
return navigate("/available-versions");
|
||||
}
|
||||
|
||||
@@ -115,8 +115,6 @@ export class MapsManagerService {
|
||||
|
||||
const progress$ = this.ipcService.sendV2<DeleteMapsProgress>("delete-maps", {args: maps}).pipe(map(progress => (progress.deleted / progress.total) * 100));
|
||||
|
||||
progress$.subscribe(console.log);
|
||||
|
||||
showProgressBar && this.progressBar.show(progress$, true);
|
||||
|
||||
progress$.toPromise().finally(() => this.progressBar.hide(true));
|
||||
|
||||
@@ -17,8 +17,8 @@ export class BeatSaverService {
|
||||
}
|
||||
|
||||
public async getMapDetailsFromHashs(hashs: string[]): Promise<BsvMapDetail[]>{
|
||||
const res = await this.ipc.send<BsvMapDetail[], string[]>("bsv-get-map-details-from-hashs", {args: hashs});
|
||||
return res.data ?? [];
|
||||
//const res = await this.ipc.send<BsvMapDetail[], string[]>("bsv-get-map-details-from-hashs", {args: hashs});
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user