Page Navigation Performance (Located in Sydney)

I’m after some collective feedback from the WeWeb team and others that have published apps (both self-hosted and WeWeb hosted).

Here’s the context in brief;

  1. My editor was crashing on one page.
  2. The diagnosis was I had too many elements on the page.
  3. The frustrating thing was that the majority of elements had conditional rendering, and the performance was unimpacted on the published version – navigation between the elements was swift.
  4. … but the editor became unusable.
  5. The recommendation (and seemingly only solution at the moment) was to split the content across pages to reduce their size.
  6. I proceeded and split the sections into their own pages.

The issue now is I have between a 5-6 second navigation event when a user is navigating between the section – it’s unpleasant and could contribute to churn.

I need to squeeze every bit of performance back so that I get a more seamless UX (like I had on the single page).

So far I’ve made sure;

  1. Every other element outside the ‘workspace’ section is a global instance so isn’t being re-rendered.
  2. I’ve removed any collection or api request being re-called when navigation is occurring between these pages.
  3. Run some comparative tests, simultaneously, with a user in Vermont, USA and myself in Sydney, Australia with significant differences in speed.

It seems to be a server location challenge, but I’d greatly appreciate any advice regarding other things I should try, or whether I have to go down the self-hosting option.

Here’s a video illustrating my current experience

The slow load of data, unless you’re using WeWeb’s data storage, is very probably caused by your backend/your connection. What backend are you using?

Hey @Broberto

I’m using Xano with an instance located in Sydney. All of my backend requests are < 1 sec.

The slow load is coming from all of the fetch requests for the WeWeb content.

Can you send me an endpoint, so I can benchmark it on my machine? If it’s not something private.
You can do this on your own also, by doing the same request outside of WeWeb.

You see, the way WeWeb works, is that it sends request on your behalf “programmatically” so it’s not like WeWeb is slowing your requests, it’s either Xano, or your connection.

If WeWeb was slow, you’d see nothing in the Network tab for 3 seconds and then it would load in a few miliseconds. If WeWeb was slow by any means, it would be sending the requests slow, not downloading them slow. Because WeWeb doesnt load anything, it’s your browser loading the data.

To benchmark it on your machine, you can simply put your endpoint in a browser and append the parameters as query strings, or create an endpoint that is not secured and has no parameters and test it both in weweb and a browser.

Are your pages private? We already have the problem with other users, when page are private, Weweb server are asking before each navigation if the user is allowed to see this page. If your server is far from the Weweb one, this can cause a big latency on page change.

Isn’t it based on the user roles/auth status? Could you share how it works deeper? Also is this same for Supabase?

@aurelie - yes all my pages are set to private.

I’ve just removed private access from the pages in context for a test. It shaves approx. 1 second off this request, compared to the above screenshot. But the content is still rendered in approx. 4.5 seconds
image

I need the application to be locked down so what is the idea here if I have to remove the ‘Private access’?

@Broberto - it sounds like it’s pointing to my connection then. The only thing that is being rendered is a Section with a Tab Element. The Tab Element has a fair number of divs, but on the page navigation I’m not making any backend request to load data (those requests are made on other actions).

Try the benchmark I mentioned before, then you will have a clearer understanding of whether it’s weweb or something between Xano and your machine

@MichaelLovell experiencing a similar performance issue. No solution so far - so eager to learn what possible fixes / solutions you’ve implemented that remediate performance to an acceptable / desired level.

We are using a WeWeb / Xano combo. Based in Europe.

1 Like

My fingers are itching to write: “don’t use Xano” might be the solution. But I don’t wanna jump to the conclusions lmao.

@Broberto Why would not using Xano be the solution here? Anything wrong with Xano-WeWeb combo?

No no, I just don’t like Xano that much :slight_smile: Seems like the only thing together with gated content? these two projects have in common while experiencing these issues. But it’s just a personal biased opinion, until proven otherwise.

@Broberto just out of curiosity, why don’t you like Xano? What is a better alternative iyo?

I don’t think this is the thread to discuss this.
Edit: Indeed I decided to exclude it.

1 Like

I’ll post some more details to the approach I’m experimenting with once I’ve made a direct comparison so that it is more helpful.

But to avoid digression, exporting and hosting the code in Sydney looks to deliver a 90% performance improvement (in the context of what this post was originally about).

1 Like

Hmm, that’s great discovery, it would still be great to understand what’s up with it. I can’t wrap my head around how it can affect network requests. Might be a WeWeb thing in the end, as Aurelie mentioned the server issue, that might make sense.

@MichaelLovell a 90% speed improvement on the 2.88 to 3.19 seconds page load time? Really? Can you show us? :sweat_smile:

To explain a bit further this question of private page.

Weweb is prerendering all your pages. This pages may contains some static content (from static collection, or directly the text you put in an element without binding for ex) and some dynamic content (for example a call to your API).
If your API is secure, and someone not authenticate go to your page, they will only see the static part, and not the dynamic part (as the API will answer 401 or 403)
Because sometimes the static part need also to be secure, when you declare a private page, Weweb will check the authorization on this page when you navigate (their is a call retrieving all the “weweb” data from this page). For that it calls your authentification end point. If weweb server and your auth server are far away, and you also are far from Weweb server, the answer time can start to be long because each exchange add a noticeable delay.
Until Weweb handle localization, and this behavior is a problem for you, you can handle yourself this part.

  1. Double check that you do not have any secure details on the static part, and that any sensitive data is retrieve through a secure dynamic endpoint
  2. Let the page public
  3. Add a onLoad trigger which will check authorization on the page, and redirect to login page or homepage if not authorized.

This is a “bit” less secure, as static info will be available, but most of the usecase this is completly ok.

1 Like