Page Load Impact from Option Sets

When we have option sets they are basically pre-loaded when the app opens. Typically it is advantageous to use option sets in instances where you would be searching frequently and can utilize an option set instead of a data type.

Is there any impact on page load speed from option sets? Specifically is there a point where the length of the option sets in the app could negatively impact page load/speed performance?

I believe option sets are better used when your list won’t exceed 20 / 30 options. The longer the list is, I guess it might affect your page load speed in which case you might want to avoid using Option Sets.

Yes there is an impact as they are all loaded on all pages regardless of use.

That being said, option sets can be super helpful in terms of WU and updating DB across environments (especially during the intensive iterative stages of a app).

There’s no difference if an OS has 30 options or if there are 10 OS with 3 options each and more importantly is the weight of each option (text value and number of attributes).

But if Option Sets are used judiciously, (no paragraphs of text or images or unnecessary options) the total weight of all of them will be minimal which will have a minimal impact on page load speed.

As with all things, yes, to an extent.

Almost all use cases will mean that option sets have no discernable impact on performance.

It’s only when you start having an option set with hundreds or thousands of options that you might want to consider moving it to a data type for performance. Alternatively, if the data stored on each option is significant. In other words, the total volume is what matters. A few heavy options = lots of light options etc.

Even if you have dozens of option sets, that’s likely only a few kilobytes of data which is negligible.

I’m gonna ask this from the opposite end. Is there a big impact on performance (from the user’s perspective) and WU consumption if you have a heavily used option set of ~10 text values vs using a Thing? My concern here is privacy rules vs performance. Just how bad of an idea is it to use a Thing statically like this? Or is there an argument to be made that even 5-50 lightweight text strings will always be fast to load (assume there’s only one Thing of that Type).

Edit:

The Good: For a small thing, fetching it is instant.

The Bad: No matter how small the thing is, there’s a “base” WU cost of .30 WU. So in my case every time I search for this thing it costs a negligible amount above that (0.015 x 1 thing + 0.000003 per character of data), which is really annoying, but I might have to just swallow it.

Never put sensitive data into an option set

Searching database has a ‘base’ performance cost, the time it takes for the client to request resources from server, server to fetch requested resources, time to send from server to client and then time to render in client. This is usually 1/2 a second to a second, so not a huge impact, but if you have an ability to remove that, it would obviously be better performance.

If you are using data types versus option sets, yes, you have to swallow the WU cost if you use data type, but if the same data can be an option set, there is no cost. For example, I took over an app build, previous developer had a list of countries as a data type, one of the first things I did was make it into an option set. Absolutely no reason to keep the list of countries as a data type and have to incur WU costs for retrieving.

There are certainly reasons that do exist (even if not applicable to your particular case):

  • storing lots of data about each country for your app
  • adding localised pricing / anything that should be admin customiseable

Those things should be a data type while there is a field related to the country option. Storing lots of data, need upload via CSV, can still have country field related to the option set. Any localized pricing again has own data type of pricing with field related to country option, just remember privacy rules for pricing data type.

For admin customizations, that too can be in a data type of it’s own with a field related to country option.

And if need be, the country field related to option can be a list.

I can’t really come up with any good reason why the list of countries would be a data type , especially in cases with lots of data stored about each country since all that data will get returned and charged WUs when needing to show a simple dropdown to a user to choose which country or perform other actions/data modification that only need the country.

There is also a chrome extension that allows us to upload options with attributes via a CSV, which makes creating option set of countries with other data points simple, but remember don’t upload sensitive data to option sets, instead create a data type and have a field related to the country option.

Oh that is interesting. The main reason I am not using options is because of the amount of labor involved in having to input data one by one.

We have, for instance, a list of 10,000 universities worldwide, listed in the database. I have no intention of typing them one at a time with all the related variables such as country they belong to etc.

10,000 is too many for option sets, it’s will break editor when trying to open.

I was thinking about that. Thanks for bringing it up.