#Slow loading times

69 messages · Page 1 of 1 (latest)

obtuse wadi
cloud aurora
#

How are those files served? Is that your server or a cloud provider domain?

Static files should be extremely quick to serve, handled directly by nginx or by a CDN/Cloudflare or similar.

#

An even larger problem – the files are set to cache for 1 second only, meaning that a navigation or reload forces the client to re-download all files.

obtuse wadi
#

how can i check that @cloud aurora Can i give you access to the github profile so you can check?

cloud aurora
#

Is the hosting setup defined in the github repository? It's more likely it's configured in some hosting provider control panel

#

You want to make sure static assets are served as static files, and with cache headers.

obtuse wadi
#

Its an shared hosting

#

directadmin

#

nginx

cloud aurora
#

It's hard to know what the problem is. Serving a static file should take less than 100 ms, but it takes 1500 ms on that server.

In addition to that, the Cache-Control headers forces browser to redownload the files after 1 second. You want to set a very long cache time for static files, and use a manifest to bust the cache via filename or query string. Laravel does that by default if you use npm run build

#

Check if the hosting provider has a required folder for static assets (e.g. public/assets)

obtuse wadi
#

No because its an simple php hosting

#

well simple

#

thats a little too hard to say but its just an webhosting

#

not a special laravel hosting or something

#

just shared hosted

#

just like cpanel

cloud aurora
#

The nr 1 priority of any web hosting is to serve static files. Something is wrong if that is slow.

obtuse wadi
#

i will make an screenshot and send it to the host

cloud aurora
#

Note that static files on https://mijn.cloudnode.nl/ are handled correctly, with cache headers

obtuse wadi
#

i sended the mail

cloud aurora
#

To speed up Laravel execution, make sure opcache is enabled, and run php artisan optimize (in production, not in development)

obtuse wadi
#

opcache wasnt enabled

#

I saw

cloud aurora
#

Opcache is definitely required to make php performant, especially if the disk is slow

obtuse wadi
#

i enabled it now

#

can you check it with me?

#

I also have this:

cloud aurora
obtuse wadi
cloud aurora
#

I haven't looked in detail, but I don't see anything immediately off. See the link I sent.

#

Make sure opcache is enabled, and that the Laravel config and route cache is applied.

obtuse wadi
#

opcache is now enabled

#

What do you mean by and that the Laravel config and route cache is applied.

cloud aurora
#

php artisan route:cache and php artisan config:clear

#

Combined by php artisan optimize

obtuse wadi
#

Im gonna run this, one moment

cloud aurora
#

I don't think opcache is enabled yet, it looks too slow still. Perhaps it takes a while. Might also require a restart of you have that button.

obtuse wadi
#

No button for that

cloud aurora
#

So you have two routes with the same name, you need to fix that

obtuse wadi
#

How?

#

i didnt maked this code 🤣

cloud aurora
#

->name() in your routes files, that has to be unique

obtuse wadi
#

What do i need to do with this

cloud aurora
#

Sorry, I don't know much about Livewire

obtuse wadi
#

Can i just remove it?

#

Or?

#

and what do i need to remove?

#

i see thats about the updating of the application but i wont go to update this installation since its fully customized

#

So if i can destroy something its okay

#

Please help me

#

@cloud aurora

cloud aurora
#

You'll have to wait for someone who knows Livewire to respond, or ask that specific question in #general

My guess is that update route is regirered twice (perhaps by app and package), but I don't know.

obtuse wadi
#

Where would these routes be registrerd?

#

NORMALLY

cloud aurora
#

web.php or api.php

obtuse wadi
#

web.php

cloud aurora
obtuse wadi
#

Page

#

its my page

#

If you give me your github username i can give you access to the repoi

cloud aurora
#

Sorry, have to leave, hope you’ll resort your problem soon!

obtuse wadi
#

😭