polarsource / polar

An open source Merchant of Record. Sell SaaS and digital products in minutes.
https://polar.sh
Apache License 2.0
3.16k stars 140 forks source link

Docs: Make them fast again #4529

Open birkjernstrom opened 21 hours ago

birkjernstrom commented 21 hours ago

Our docs sometimes become slow due to suddenly having to read, parse & transform our OpenAPI schema upon request vs. cached as the intent.

We consistently fix this, but then NextJS stops rendering them statically again. Probably skill issues (😅), but it's annoying and error prone.

We should investigate a more long-term solution to ensure fully static pages and faster response times.

frankie567 commented 21 hours ago

I think it's probably related to the fact that we add dynamic inputs to each properties.

Sad to say but after few considerations I would say:

  1. It's a darling. I don't think it's really used or useful
  2. It's half-baked, especially since we're not able to update the SDK snippets accordingly
  3. It slows us down.

My call: kill the feature and keep only static information. 99% sure it'll solve those problems for good.

frankie567 commented 17 hours ago

I was wrong :/ Investigating!

birkjernstrom commented 16 hours ago

Ok interesting & strange - felt like a good theory.

However, feel free to remove the dynamic inputs if you want. To your point, it's half-baked now and we have other ideas for the near-term of how we can increase the DX to get the customers own variables.