Closed uncovery closed 6 years ago
I think making a file so you can register plugins might be more of an effective way of doing this, instead of scraping the folder, Also, not saying that this would be an issue, but if any feature ever is found buggy and needs to be temporarily disabled then having this would be as simple as commenting it out.
Would it also make sense to do some routing with an if statement on a command name? Then it would include only the files needed to run the command?
The file is probably a good solution. At least I could build one once a day as a cache instead of re-reading it every time.
The disabling is already taken care of since there is a switch inside the plugin that allows that.
Not sure what you mean with the routing. Can you explain?
We need to have this list created dynamically on a schedule (like server restart or timer)
ok, fixed.
with 0.02 seconds, this function is one of the slowest we have. I strongly assume that this is because of the file read operation. It's also executed with every websend command.
We can either store the list of files somewhere or find another way to speed this up.