After Implementing GestureManager, I've found that whenever each gesture gets added, I will have its own unique calculations for determinator, which will lead crucial performance issue.
To deal with this issue, Im thinking of caching calculations and forward them whenever each plugin request it.
Basic Example
/// sample plugin
class SamplePlugin{
constructor(){
this.caculation = ['func::getDistance-thumbTip-indexTip', 'var::thumbTip','var::indexTip'] // concat, and make it as key for retreiving result
}
}
/// sample gesture determinator
class Gesture{
constructor(){
}
determinator(... , cached){
const distanceBetweenThumbAndIndex = cached['getDistance-thumb-index'];
}
}
Drawbacks
Nope, Its just kinda relocating of codes, so it won't make any drawbacks.
Start Date
2024/05/16
Summary
After Implementing GestureManager, I've found that whenever each gesture gets added, I will have its own unique calculations for determinator, which will lead crucial performance issue.
To deal with this issue, Im thinking of caching calculations and forward them whenever each plugin request it.
Basic Example
Drawbacks
Nope, Its just kinda relocating of codes, so it won't make any drawbacks.
Implementation PR
23
Reference Issues
No response