@motinska94 You need to actually profile the application and log where time is being spent, instead of just constantly moving the application and rewriting it for the third time.
Can you tell how/why is my site extremely slow? [Livewire]
I've built a simple, in-restaurant order taking app for a client, using livewire for "basic" things like getting the product names from the database when category button is clicked. But for some reason it has gotten "extremely" slow after a month of usage. And my client keeps calling me and says the site is unusable, I've pretty much rebuilt the entire site, twice. I even cached all the products by category ids (there aren't many, 5 categories with around 10 products in total) but nothing changed.
I've asked the hosting company about it and they said there's nothing wrong with the server, then I said that there's nothing wrong with the code either and it ended in a stalemate. I even convinced them to move the site to another server but it's still just as slow. The thing that takes most time as I'm seeing from the devtools' network tab is waiting for server response action. And I have seen it take up to 23 seconds, to fetch 3kb worth of data from cache, multiple times.
It was my first time using Livewire and I have no idea if it's my fault or is there something else at play. Now I'm literally rewriting the whole project, from scratch. I know it may sound crazy but that's where I am now, I've delivered the website and received my payment 2 months ago. I just want to get this over with already..
Like, it's literally "getting a 3kb cached data (json array) and showing it on the screen on a button click". This. This is taking over 20 seconds. I'm all ears for any suggestions.
What I've tried so far :
- Moving the site to another server.
- Switching to cache instead of querying the database.
- Clearing the database (I think this is a very important point, because client was happy with the site for the first couple of weeks, therefore my first thought was that the database was inflated and it was causing an issue, but clearing the database did not change anything.)
I can't even think of anything else I could do from my end. Should I suggest them to move to another hosting company? It will be very awkward since I was the one who recommended the current one to them. If I do need to redirect them to another hosting, how should I handle this? Should I pay for the first server's fee myself? Because I don't think they do refunds and it cost extra money to my client (apart from what I charged them for the side), and so will the new one.
Please or to participate in this conversation.