I'm building a SVG map separated into about 200 regions. For each region there are attributes that describe it, as well as a region ID. These regions are just polygons in the SVG.

I setup a custom post type so that the data associated with these regions could be added in the dashboard, and upon a user clicking a region, its ID would be used to retrieve the associated its data and display it in a tooltip via AJAX.

This is working fine and dandy, but I would like to improve on it by injecting the attributes to the region polygons as data-attributes once the SVG is loaded. This would allow me to tweak how the polygons look (e.g. color-code) dependent on their attributes without resorting to the query / tooltip method.

My question is, when retrieving custom fields alongside so many posts (~200), will this cause performance concerns? Is there an alternative way of structuring this information so that it can be managed in the dashboard?

To re-iterate, there are roughly 200 items that each have 10 custom fields, and I want to retrieve all of this data on page load.

1 Answer 1


There are a number of caching plugins that may work for you, or build the data on the admin side when posts are added/updated and save it in an option.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.