perfectly-preserved-pie / larentals

An interactive map of for-sale & rental property listings in Los Angeles County, updated weekly.
https://wheretolive.la
15 stars 3 forks source link

Further improve GeoJSON loading speed #180

Closed perfectly-preserved-pie closed 7 months ago

perfectly-preserved-pie commented 7 months ago

I still wasn't thrilled with the loading speed even after #179. I saw a suggestion to host the GeoJSON as a file inside the assets folder for faster loading. This actually works out better; rather than generating the GeoJSON dynamically every time the page is loaded via function, I can just store it as a file because the data itself rarely changes or gets updated.

I also did it with the the buy & lease Parquet files and that also seems to have increased the speed. Before the changes / takes about ~1800ms to load. After the changes it takes only 160ms; that's a roughly 90% increase in speed. Crazy fast. The site as a whole feels a lot snappier.