Wave SAAS v3 opens pages very slow

mikemastercorp

Nov 1st, 2024 06:31 PM

Dear Team,

I just installed Wave SAAS v3 and I am not sure why it happens but i am experiencing similar issues like the ones I had with Genesis - pages delivered on every click take around 10-15 seconds to open.

To be precise, I am running Laravel Herd Pro with mail/mysql as modules, so nothing fancy. Old Wave version opens super fast too.

The system has 64GB DDR5, Intel i7 11th Gen CPU, 2TB NVME which is way more than enough running single project at the time.

I did absolutely no modifications so have a fresh install and it lags badly which is unfortunate as on the same system I've developped multiple other projects using Filament and Livewire and never had a single performance issue.

Any ideas what can cause such issue as I wanted to test Genesis but because of the lag I had to drop it as it took sometimes over a minute to deliver a single page and if I can't work on a project remotely I can't have the security I am aiming at etc.

I was extremely happy to see the latest announce about v3 of Wave and wanted to start testing it thoroughly but it seems like so far it is not usable on my system and I really really need to figure out what is happening and why it lags so badly.

Any advice is more than welcome and i am ready to provide anything that might be needed so that we can resolve completely this issue...

Thanks in advance, Milen

mikemastercorp

Nov 1st, 2024 06:34 PM

On another thought, it is funny not to have the good old bread/DB GUI, but with Filament we don't actually need it other than adding a migration and a resource so I am pretty sure this version would be welcomed gladly by many as far as they don't fall for the same issue like me...

mikemastercorp

Nov 1st, 2024 06:47 PM

Also one other interesting fact I've discovered, after running the app in dev mode with npm and using command: 'php artisan serve' if I try to navigate to http://127.0.0.1:8000 I get the same poor performance identical to the one with Herd.

So it seems like it might not be fully related to Herd afteral and I am using SQLite as a database as to avoid any MySQL comms delay for the initial testing...

Here is a screenshot of the loading times in Dev Console: wave-saas-v3-home-loading-time.png

Hope it helps...

bobbyiliev

Nov 2nd, 2024 06:16 AM

Hey Milen!

This is very interesting, I had another user report a similar problem but no where near the 10-20 seconds that you are seeing.

I am very keen on getting to the bottom of this, but I've not been able to reproduce it locally.

Are you using Windows?

As a quick test, if you were to run php artisan optimize does the load time improve drastically?

Also, can you open the browser network console and see if there are any errors in there and what the slowest requests are in there?

Any additional information will also be very helpful!

I will be trying to reproduce this on my end too.

- Bobby

sean20

Nov 2nd, 2024 06:04 PM

I posted on Github but probably better to discuss here. I've had the same 10+ second request times. Sometimes it would timeout after 30. Tested on Windows with Herd as well as PHPWebStudy. None of the other frameworks (Wave 2.0, Filament, Twill, Pyro, Orchid, VaahCMS) have had any slow down issues.

After php artisan optimize I'm still getting the same 10+ second booting timeline and no improvement. Network console shows the html document itself is the only slowdown; everything else is 0ms

Console errors:

posts:1363

Mixed Content: The page at 'https://app.test/admin/posts' was loaded over HTTPS, but requested an insecure element 'http://app.test/storage/demo/post-market.jpg'. This request was automatically upgraded to HTTPS, For more information see https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.htmlUnderstand this warningAI
posts:2802

Uncaught TypeError: Cannot read properties of null (reading 'includes')
    at posts:2802:42
    at NodeList.forEach (<anonymous>)
    at posts:2800:18
(anonymous) @ posts:2802
(anonymous) @ posts:2800Understand this errorAI
posts:3019

Livewire: The published Livewire assets are out of date
 See: https://livewire.laravel.com/docs/installation#publishing-livewires-frontend-assets
(anonymous) @ posts:3019Understand this warningAI

=== REPOST FROM MY GITHUB DISCUSSION ===


Home Page = Booting (11.11s), Application (1.39s)
Home Page = Booting (10.52s), Application (366ms)
Admin Page = Booting (10.48s), Application (486ms)
Admin Page = Booting (10.76s), Application (425ms)

Local Win 11 23H2 laptop with i7-13620H and 16GB RAM
Nginx 1.27.2
PHP 8.3.12
MariaDB 11.5.2

I occasionally this error pops up:

Symfony \ Component \ ErrorHandler \ Error \ FatalError
PHP 8.3.12
Laravel 11.28.1
Maximum execution time of 30 seconds exceeded

D:\Temp\project\vendor\symfony\finder\Iterator\SortableIterator.php: 51

    private \Traversable $iterator;
    private \Closure|int $sort;

    /**
     * @param \Traversable<string, \SplFileInfo> $iterator
     * @param int|callable                       $sort     The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback)
     *
     * @throws \InvalidArgumentException
     */

    public function __construct(\Traversable $iterator, int|callable $sort, bool $reverseOrder = false)
    {
        $this->iterator = $iterator;
        $order = $reverseOrder ? -1 : 1;

        if (self::SORT_BY_NAME === $sort) {
            $this->sort = static fn (\SplFileInfo $a, \SplFileInfo $b) => $order * strcmp($a->getRealPath()

(2) LOGS

installed.json does not exist at: D:\Temp\app\resources\plugins/installed.json

Installed plugins: []
mikemastercorp

Nov 3rd, 2024 06:00 AM

Hello Bobby. Anything I can provide as an information, you can count me as being an IT for over 30 years now and a Dev for over 5 I know how important is any piece of information in order to be able to properly troubleshoot and resolve an issue...

So to start in order..

  1. Here is the system/OS info and I've made sure the system is up-to-date as of now:

Host Name: DEV-SERVER OS Name: Microsoft Windows 11 Pro OS Version: 10.0.22631 N/A Build 22631 OS Manufacturer: Microsoft Corporation OS Configuration: Standalone Workstation OS Build Type: Multiprocessor Free Original Install Date: 03/31/2024, 02:53:35 System Boot Time: 10/23/2024, 08:32:00 System Manufacturer: Dell Inc. System Model: Precision 7750 System Type: x64-based PC

  1. Console has returned some errors but I believe those should be related to Laravel failing to deliver the page and returning a timeout after 30 seconds: firefox-console-error.png

  2. php artisan optimize - returned success but had no improvement on the loading times: php-artisan-optimize.png

  3. php artisan optimize:clear - same thing php-artisan-optimize-clear.png

  4. I quite often get an maximum execution time error when loading the login or any other page, sometimes I am able to navigate to Home page with success but again, after less than the limit time of 30 seconds. Here is a screenshot of the error: maximum-execution-time-error.png

Again, my situation is exactly like Sean20 - no issues running Filament, Wave2 or any other sort of applications, just with Genesis and Wave3 I've noticed the issue is there and it is barely possible to use the SAAS app no matter how great it is...

I've done some due diligence on my side and disabled any firewall as I know sometimes the issue could be a problem with resolving domains, firewall suspicions behavior on Herd and incoming/outgoing connections - unfortunately this did not help either...

About HERD - I am using version 1.10.0 (the PRO licensed version which seems to be the latest) on Windows 11 Pro with latest updates (as stated earlier).

In my services list I've had only MySQL and Reverb which were enabled. As part of the test, I've disabled reverb service so all my further tests were with only MySQL service running. This seemed to improved a bit the success of navigating to any other page besides home but time remained the same and eventually I got timeout error too again on some of the pages, but not on all... Not sure how related should be the Reverb Websocket service but it did at least allow me to navigate to dashboard/admin panel and a few others I've tried if i refresh a few times.

I've set to navigate to Admin panel and initiated a 'netstat' session to see what is happening... Interesting enough I am having many lines of the type: TCP 127.0.0.1:51675 database:58558 TIME_WAIT

Here is a screen-cast to demonstrate the amount of lines and I was scrolling on speed to avoid boring staring of the screen: system-netstat-during-admin-loading.gif

It seems interesting to see so many waiting for connection times even when my DB is set to SQLite and reading a database from a file should be complete for a fraction of a second or a second max...

Besides that I am still buffeld what could cause the error as Herd main.log shows no errors or any lines of log as well...

Hope it helps but any further steps requied, please shoot right away and I will do my best to answer promptly. My plan for today is to test Wave3 on Google IDX and see how it behaves there. This will allow me to determine what is happening but I will also setup Herd on another different system to see how it behaves there so that we are aware if this issue is system related or some hardware...

As I stated earlier, I don't think this issue is ever Herd related as I've experienced the same issue even with 'php artisan serve' and 'npm run dev' on the same system...

mikemastercorp

Nov 3rd, 2024 08:08 PM

Btw, I was wondering what is the common thing between Genesis and Wave v3. Is it a theme issue loading some files, does it need some external connectivity like Pusher etc. or anything else as I did not yet configure Pusher since I am barely able to login or navigate to dashboard to setup plans etc...

sean20

Nov 3rd, 2024 10:30 PM

I've successfully installed on a cPanel bare-metal server with Dual E5s, 64GB RAM, SSDs in RAID-1 and got mid 2 second response times before php artisan optimize. No difference after optimize. First time I've installed Laravel on the box so not sure if mid 2 seconds is bad or horrible. But definitely a lot more workable than the 10-20 seconds on Windows i7-13gen laptop.

Here are the console errors:

admin:1679

Uncaught TypeError: Cannot read properties of null (reading 'includes')
    at admin:1679:42
    at NodeList.forEach (<anonymous>)
    at admin:1677:18
(anonymous) @ admin:1679
(anonymous) @ admin:1677Understand this errorAI
admin:1896

Livewire: The published Livewire assets are out of date
 See: https://livewire.laravel.com/docs/installation#publishing-livewires-frontend-assets
(anonymous) @ admin:1896Understand this warningAI
admin:300 

GET https://example.com/storage/demo/default.png 404 (Not Found)
bobbyiliev

Nov 4th, 2024 03:31 AM

Hey!

I have a feeling that it is somehow related to Windows and how it handles config reads, but I still need to verify that theory.

On a Mac with fairly low resources, using Herd, a fresh new install loads in ~200 milliseconds without php artisan optimize, with optimize, it loads for half of that.

I will spin up a Windows VM and see if I can reproduce that 10-20 seconds load time.

As you mentioned that this also affect Genesis, the one thing that it has in common with Wave is the Config writer package:

https://github.com/thedevdojo/config-writer

So my theory so far, though not test, is that somehow on Windows the config writer is taking a long time to do all of the disk IOs.

Will keep you posted!

- Bobbyw

mikemastercorp

Nov 4th, 2024 04:47 AM

Hey @Bobby, is the config writer newly introduced or modified since 3.0 as with 2.0 I had no issues at all and I believe the config writer was there too even though it got modified for sure because of the new admin panel?

I am thinking on adding the debug bar and wiretap or some other tools to see where is the culprit in terms of Livewire execution as it won't be related to Tailwind or other parts as those work perfectly fine to deliver the 100-500ms page load.

Also, if it was the issue with Windows do you believe that all other devs are not using Windows and are just Linux/Mac users? I would honestly doubt it but who knows...

Besides, if it was the issue with config writer, why would you write something in a config at the time of navigation to a route? I would expect the Config Writer to write some changes at the time of modifying settings, initial installation etc. but not when I am browsing the pages...

Are there any events that are broadcasted or anything else that is happening on every page as like I mentioned earlier, it is not just a specific view but the entire Wave ecosystem that is barely browsable and like I said, I have an emulation of a full VPS system with Intgel 11th gen i7 and 64GB load of RAM DDR5 so should be blazing fast as it works with Wave v2...

I did not test the setup on my other machine which has 16GB of RAM and is again Intel i7 11-12th Gen just to exclude something related to the hardware of the specific system, but will do it and report today the outcome.

@sean20 - 2sec sort of is OK depending on the bandwidth of the server, your Internet connection etc. Remember after all that the navigation is not like from your LAN so it is normal to have a bit of delay which you can optimize later, but like you said, it is workable at least ;)

Btw, Bobby, if you like, I can setup a system with the issue for you and provide you some TV or other access to inspect further if the issue persists still on the other system...

mikemastercorp

Nov 4th, 2024 08:40 AM

FYI, Bobby, I've tested on my other computer as promised using the same Herd Pro with same configurations.

As expected my other system was under Windows but 10 Pro instead of 11 Pro as the initial one lagging.

Here are the specs: Processor: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz, 2419Mhzm 4 Cores(s) 8 Logic C. Installed Physical Memory (RAM) 16.0GB DDR5 OS: Windows 10 Pro v.22H2 (OS Build 19045.5011)

Using the same approach and up-to-date on Windows Updates, I am not experiencing the same issue and I can freely work with Wave SAAS on it with a minimal 1-2 sec lagging which can be expected considering no caching, no nothing is applied...

wave3-saas-on-win10.gif

So based on the facts, this must not be really related to hardware nor windows in particular but something about Windows 11 that happens and I don't have another spare machine freshly installed with Win11 to test, so I will have to try to reproduce as well on a VM with the same host system that caused the issue at the first place...

Like I said, if I manage to reproduce it, I will be more than glad to provide you a remote access so that you can run any tests you'd need on a failing to deliver pages system...

Report
1
vladko

Nov 4th, 2024 12:13 PM

Try to cache the icons

indunil-peramuna

Nov 4th, 2024 06:37 PM

Hi I think the problem is sqllite, coz in default laravel shipped sqllite db dont have WAL enabled, Try googling WAL but just try following and see

https://github.com/nunomaduro/laravel-optimize-database

bobbyiliev

Nov 5th, 2024 12:41 AM

Hey all!

Let me try and cover all points! Hope that I did not miss anything:

is the config writer newly introduced or modified since 3.0 as with 2.0 I had no issues at all and I believe the config writer was there too even though it got modified for sure because of the new admin panel?

Yep, it was introduced in V3 to handle the settings, that's why I assumed it could be the culprit. But I've not verified that, it's just a guess.

I am thinking on adding the debug bar and wiretap or some other tools to see where is the culprit in terms of Livewire execution as it won't be related to Tailwind or other parts as those work perfectly fine to deliver the 100-500ms page load.

Yes! That's a good idea, that might help us to identify the issue.

Also, if it was the issue with Windows do you believe that all other devs are not using Windows and are just Linux/Mac users? I would honestly doubt it but who knows...

I'm not sure about that, but so far I've only seen this issue reported by Windows users. So, it might be related to Windows, but I'm not sure yet! I have to setup a Windows 11 machine to test it myself!

Besides, if it was the issue with config writer, why would you write something in a config at the time of navigation to a route? I would expect the Config Writer to write some changes at the time of modifying settings, initial installation etc. but not when I am browsing the pages...

That is a good point, if this was indeed the issue, running the optimize command should fix it as it will cache the config files and doesn't need to rewrite them on every request from disk.

Are there any events that are broadcasted or anything else that is happening on every page as like I mentioned earlier, it is not just a specific view but the entire Wave ecosystem that is barely browsable and like I said, I have an emulation of a full VPS system with Intgel 11th gen i7 and 64GB load of RAM DDR5 so should be blazing fast as it works with Wave v2...

There shouldn't be any events that are broadcasted on every page load.

btw, Bobby, if you like, I can setup a system with the issue for you and provide you some TV or other access to inspect further if the issue persists still on the other system...

I will try to setup a Windows 11 machine and test it myself, but if I can't reproduce the issue, I might need your help to setup a system with the issue to debug it further. Thanks for the offer, very much appreciated!

FYI, Bobby, I've tested on my other computer as promised using the same Herd Pro with same configurations. As expected my other system was under Windows but 10 Pro instead of 11 Pro as the initial one lagging. Here are the specs: Processor: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz, 2419Mhzm 4 Cores(s) 8 Logic C. Installed Physical Memory (RAM) 16.0GB DDR5 OS: Windows 10 Pro v.22H2 (OS Build 19045.5011), Using the same approach and up-to-date on Windows Updates, I am not experiencing the same issue and I can freely work with Wave SAAS on it with a minimal 1-2 sec lagging which can be expected considering no caching, no nothing is applied...

Thank you so much for taking the time to test it on another Windows machine! That's very helpful! Based on that, I will try to reproduce it on a Windows 11 machine and see if I can find the issue!

Like I said, if I manage to reproduce it, I will be more than glad to provide you a remote access so that you can run any tests you'd need on a failing to deliver pages system...

Sounds great! Thank you for all of your help so far!


On another note, as @indunil-peramuna mentioned, it might indeed be a good idea to give that DB optimize package a try, to see if it helps with the performance!

Thanks to everyone for all of your help and suggestions so far! 🙏

- Bobby

sean20

Nov 6th, 2024 04:51 AM

Found something which significantly helped on both Windows 11 laptop and Baremetal Dual E5 box:

php artisan icons:cache

Before Request Duration After Req Dur
Windows 11 13.64s (13.13s boot + 512ms app) 1.42s (1.05s boot + 361ms app)
Baremetal 974ms (667ms boot + 308ms app) 430ms (126ms boot + 304ms app)

At 1.42s it is bearable but I wouldn't say performant with an empty database on both nearly idling hardware. I'm going to test a fresh new Filament install as well a couple Filament panels and just see if that is in range or whether there is something else that is also making it slow in comparison. But definately a step in the right direction.

Report
1
Load More Answers