-
Notifications
You must be signed in to change notification settings - Fork 8
03 – Optimization & Caching
This section is great for both making the library run faster and understand how it works under-the-hood. However, it is not required in order to use the library.
There are plenty of times where going through the trouble of optimizing how you use a library can pay off. For this library, I would recommend going through the effort only if it is possible for your application to work with more than 500 instances of the main class at once.
Generally speaking, this library can perform most of the main class methods over 10,000 times in a second. However, when it come to schemes and gradients it takes considerably longer. Caching was introduced specifically to help combat this issue, but there are still some cases where even that can't help you.
For some situations, it may be better to use some of the underlying classes rather than routing through the main class.
If you are only converting a color between spectrums and don't care about the rest of the features, it is always better to use the convert class instead of going through the main class. However unlike the main class, the convert class won't magically handle the in-between conversions for you.
Bla Bla Bla
Copyright © 2016 Nicholas Jordon
This documentation is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.