Ghost Tags API is damn slow (60 secs) with 15000 tags

If you’re looking for some help, it’s important to provide as much context as possible so that people are able to assist you. Try to always mention:

  • What version of Ghost are you using?

  • What configuration?
    8GB Ram, 4CPU server running with 0 traffic and 0 usage
    Ghost blog with 1000 posts, 2 authors and 15000 tags

  • What browser?

The Ghost posts API is still fine and loads quick (even though sometimes 2-4 seconds), but the tags API takes like 40-60 seconds (much more likely as nginx times it out by then).
Why is it so ? I am kind of bummed by this as I always thought the API and query is like wordpress/normal database query where your only limit is your resources, but here my server is never going above 10% of resource usage and TAGS API taking 60 seconds with just 15000 tags ? (each post has 10-15 tags)

My wordpress site has more than 200k tags and it runs smooth, both blog and API.
I need to make use of {{get}} helper and API for my use but the tags API is justf ailing on me

I think the more important question here is why are you using 15000 tags? If you’re going for extra SEO perks by adding tags to your posts I think you’ve surpassed the ceiling :sweat_smile:

You also mention the API, are you referring to the handlebars theme layer or are you using the Ghost Content API itself?

The tags are not for SEO but for keyword/tags of the post itself for interlinking purpose to other followup or posts under same category (well tags as category) and for a API/bot script I have created that manages my blog, updating it, etc.

I tried both handlebar {{get}} helper and ghost content API and both were equally dead slow, 40secs+

I see. It just seems like a lot of tags, is your site quite large? If you’re willing to share your site I’d be very interested in your setup and whether I can help with performance :slight_smile: