A quick update for y'all.
Though the plugin is undergoing a massive update, I wasn't happy with the current speeds of
glxFonts(),
glxModels(), and
glxTextures(). Running tests on multiple machines, these functions, which are used to grab the data relevant to the specific function, were very slow. They averaged
3.5s on newer machines, and
4.7s on older machines per
100 calls!
That said, if in a single loop you had it watch health and prayer, make sure auto-retaliate is enabled, check to see if your fighting, check overload and other buffs, etc... You're looking at dozens of calls. That's why previously I had functions like
obsGetLifePoints() accept a glTextureArray. That way, you could grab all relevant fonts, models, and textures at the beginning of the loop and use that data.
Well, I dislike that approach. It's sloppy and requires duplicates of each function, method, or procedure. So, I added caching. Let me explain.
How often do you
really need to grab data off screen? If you're watching your prayer, do you really need an accurate number to the
1-2ms? Unlikely. Keeping that in mind, I rewrote
glx...() functions to
glFonts(),
glModels(),
glTextures().
These functions save the data returned for
60ms by default. This is customizable with
ogl.setCacheTime(int32). To change the default time, the time loaded with
ogl.setup(), use
ogl.setDefaultCacheTime(int32).
To give you an idea of the increase in performance bonuses, I was able to execute
1000 calls of
bank.getTab() in under
15ms on an average machine. Previously, this would have taken well over
50s. While rapidly monitoring the results, the change wasn't noticeable the the human eye... Or mine at least.
Anyways, I've added some more interfaces and some other things to the Git. The library is lacking the most important function,
menu.clickOption() (right click > select option), but that's taking a fair bit of time for me and I just get annoyed and move on to something else.
Cheers guys! A lot more to come! Got a lot in the works, but have to test and fool-proof it.
.