mirror of
https://github.com/ente-io/ente.git
synced 2025-05-28 21:47:57 +00:00
Sentry has a measurable impact on page load, a metric that I'm keen to improve. Apparently by default it loses us 8-9 page speed points, though that can be reduced to 3-4 (https://github.com/getsentry/sentry-javascript/issues/9179). All of this is doable, but there are bigger tasks to deal with. This is not to say that Sentry won't be useful again at some point, when we have time to deal with it better. But right now, we discussed that it's just better to remove Sentry instead of piling on to the sunk cost.
32 lines
593 B
TypeScript
32 lines
593 B
TypeScript
export enum MS_KEYS {
|
|
SRP_CONFIGURE_IN_PROGRESS = "srpConfigureInProgress",
|
|
REDIRECT_URL = "redirectUrl",
|
|
}
|
|
|
|
type StoreType = Map<Partial<MS_KEYS>, any>;
|
|
|
|
class InMemoryStore {
|
|
private store: StoreType = new Map();
|
|
|
|
get(key: MS_KEYS) {
|
|
return this.store.get(key);
|
|
}
|
|
|
|
set(key: MS_KEYS, value: any) {
|
|
this.store.set(key, value);
|
|
}
|
|
|
|
delete(key: MS_KEYS) {
|
|
this.store.delete(key);
|
|
}
|
|
|
|
has(key: MS_KEYS) {
|
|
return this.store.has(key);
|
|
}
|
|
clear() {
|
|
this.store.clear();
|
|
}
|
|
}
|
|
|
|
export default new InMemoryStore();
|