forked from MapComplete/MapComplete
Performance improvements
This commit is contained in:
parent
49f78d5604
commit
8f8ef690a4
11 changed files with 125 additions and 101 deletions
|
@ -16,7 +16,7 @@ export class ElementStorage {
|
|||
}
|
||||
|
||||
addElement(element): UIEventSource<any> {
|
||||
const eventSource = new UIEventSource<any>(element.properties);
|
||||
const eventSource = new UIEventSource<any>(element.properties, "tags of "+element.properties.id);
|
||||
this._elements[element.properties.id] = eventSource;
|
||||
return eventSource;
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ export class OsmConnection {
|
|||
}
|
||||
|
||||
|
||||
this.userDetails = new UIEventSource<UserDetails>(new UserDetails());
|
||||
this.userDetails = new UIEventSource<UserDetails>(new UserDetails(), "userDetails");
|
||||
this.userDetails.data.dryRun = dryRun;
|
||||
this._dryRun = dryRun;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ export class UIEventSource<T> {
|
|||
return [];
|
||||
}
|
||||
// @ts-ignore
|
||||
window.mcperf = () => {
|
||||
window.mapcomplete_performance = () => {
|
||||
console.log(UIEventSource.allSources.length, "uieventsources created");
|
||||
const copy = [...UIEventSource.allSources];
|
||||
copy.sort((a,b) => b._callbacks.length - a._callbacks.length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue