Added guava caches to performance-sensitive components
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
package com.willfp.eco.internal.spigot.data
|
||||
|
||||
import com.willfp.eco.core.data.keys.PersistentDataKey
|
||||
import com.willfp.eco.internal.spigot.data.storage.DataHandler
|
||||
import java.util.UUID
|
||||
|
||||
@@ -23,22 +23,17 @@ class EcoProfileHandler(
|
||||
|
||||
val data = mutableMapOf<PersistentDataKey<*>, Any>()
|
||||
|
||||
return if (uuid == serverProfileUUID) {
|
||||
val profile = EcoServerProfile(data, handler)
|
||||
loaded[uuid] = profile
|
||||
profile
|
||||
} else {
|
||||
val profile = EcoPlayerProfile(data, uuid, handler)
|
||||
loaded[uuid] = profile
|
||||
profile
|
||||
}
|
||||
val profile = if (uuid == serverProfileUUID)
|
||||
EcoServerProfile(data, handler) else EcoPlayerProfile(data, uuid, handler)
|
||||
|
||||
loaded[uuid] = profile
|
||||
return profile
|
||||
}
|
||||
|
||||
override fun load(uuid: UUID): PlayerProfile {
|
||||
return loadGenericProfile(uuid) as PlayerProfile
|
||||
}
|
||||
|
||||
|
||||
override fun loadServerProfile(): ServerProfile {
|
||||
return loadGenericProfile(serverProfileUUID) as ServerProfile
|
||||
}
|
||||
|
||||
@@ -57,5 +57,4 @@ libraries:
|
||||
- 'mysql:mysql-connector-java:8.0.25'
|
||||
- 'com.google.guava:guava:31.0.1-jre'
|
||||
- 'com.zaxxer:HikariCP:5.0.0'
|
||||
- 'org.apache.commons:commons-lang3:3.0'
|
||||
- 'org.objenesis:objenesis:3.2'
|
||||
Reference in New Issue
Block a user