The Crystal Programming Language Forum

Why are CrystalShards.org & CrystalShards.xyz so slow?

I recently learned about Crystal Language and really find it exciting. Trying out a few examples of my own, I came across CrystalShards.org and CrystalShards.xyz as useful sites to lookup existing shards. However, thinking that these sites cater to Crystal language users and would be built using Crystal themselves, I’m perplexed as to why they are sooo slow? Example request below took close to 7s. Can someone please explain why this is so?

Thank you in advance!

$ time curl -sI http://crystalshards.xyz/?filter=frameworks
HTTP/1.1 200 OK
Server: Cowboy
Date: Sun, 28 Mar 2021 13:16:31 GMT
Connection: keep-alive
X-Powered-By: Kemal
Content-Type: text/html
Transfer-Encoding: chunked
Via: 1.1 vegur


real    0m7.051s
user    0m0.016s
sys     0m0.031s

Pretty sure they’re just wrappers around Github’s search API. Try https://shardbox.org/ which runs its own database.

1 Like

It loads fast for me. It might be that these are hosted on heroku, so they are taken down from time to time.

2 Likes

Thank you @jhass, that makes more sense. Amazing language, already loving it! Wrote a shell based executable to streamline local lookups of US zipcodes and SQLite backend…HYPERFAST!!!

2 Likes