Speed rating: Excellent on desktop, slow on mobile

Hi! I have a webpage that in "PageSpeed Insights" gets a 95 score for the desktop version, but for mobile version it gets 32!

Anyone have any clue why this could be happening and improved? Does this affects google searches?

The page is: https://www.portalconstructor.cl/p1/arena-fina-en-camionadas-con-despacho-a-la-obra

My guess is that is the Box "boxSolicitarMobile" that opens after it load so the user can "Book" the service. But is necessary to show it this way. If this is the case, Could this arrenge differently so that Google read it differently but has the same effect?

Here is the main part of the code:
import wixLocation from 'wix-location';
import wixWindow from 'wix-window';
import wixUsers from 'wix-users';
import { checkIfLoggedIn } from 'public/checkIfLoggedIn.js';
import { getCompany } from 'backend/database.jsw';
import { createPedido } from 'backend/database.jsw';
import wixData from 'wix-data';

var itemObj = {}; //Object to save item got from dynamic database.
//Save inputs for calculation or data creation.
var inputs = {
    fecha: new Date(),
    cantidad: 0,
    iptCantidadIndex: null,
    iptVariantIndex: null,
    costoFijo: {label: "",value:0},
    variant1: {label: "",value:0}
};  
//Values use in page for calculation, display or saving on database.
var values = {
    valorUnitario: 0,
    importe1: 0,
    costoFijo: 0,
    costoOpc: 0,
    neto: 0,
    comision: 0
}; 

var imageStandard = "https://static.wixstatic.com/media/494ef1_a2b5b4ecbe704c118d0f42890b3afadd~mv2.png";
var linkPage;
var linkMenu = "Menu flotante login";
$w("#menuHamburguesa2").link = "";
var agendarBtnClicked = false;
var isLoggedIn;
var recProducts;
var empresas;
//$w("#imagenProducto").fitMode = "fit";

$w.onReady(function () {
    $w('#boxSolicitarMobile').show('fade'); //When page ready it shows the box for booking.
    
    $w('#dynamicDataset').onReady(async () => {
        itemObj = $w('#dynamicDataset').getCurrentItem();
        loadItem(itemObj);
        let proveedor = await getCompany(itemObj.empresa);
        itemObj.empresa = proveedor[0];
        console.log("Empresa: ", itemObj.empresa);
    });

    main();
});

async function main() {
  linkPage = wixLocation.url;
  
  isLoggedIn = await checkIfLoggedIn();
  if (isLoggedIn) {
    ifLoggedIn();
  }
}

//DATA FUNCTIONS____________________________________________________________________________________________________________________

export function loadItem(itemObj) { 
    // Check if item has values. If it does, display it.
    if (itemObj.valorUnitario) {
      values.valorUnitario = itemObj.valorUnitario;
      $w("#txtMonto").text = $w("#txtMontoMobile").text = numberPesos(itemObj.valorUnitario || 0);
    } 
    if (itemObj.comuna && itemObj.ciudad) {$w("#txtUbicacion").text = `${itemObj.comuna}, ${itemObj.ciudad}`;}
    if (!itemObj.imagen) {$w("#imagenProducto").src = imageStandard;}
    if (itemObj.unidadCantidad) {$w("#txtUnidad").text = $w("#txtUnidadMobile").text = `/ ${removeFirstAndLast(itemObj.unidadCantidad)}`;}
    if (itemObj.txtOpcion) {$w("#txtOpcion").text = itemObj.txtOpcion;}
    if (itemObj.opcionesCantidad) {
        $w("#iptCantidad").options = itemObj.opcionesCantidad; 
        $w("#iptCantidad").value = itemObj.cantidadPorDefecto;
        inputs.cantidad = Number($w("#iptCantidad").value);
    }
    if (!itemObj.disponible) {
      $w("#btnSolicitar,#btnAgendarMobile").label = "No disponible";
      $w("#btnSolicitar,#btnAgendarMobile").disable();
    }
    if (itemObj.opcionesVariantes) {
      const opts = itemObj.opcionesVariantes;
      $w("#iptVariant1").options = opts;
    }
    if (itemObj.costoFijo) {inputs.costoFijo = itemObj.costoFijo;}

    calcularReserva(inputs.cantidad,inputs.costoFijo["label"],inputs.costoFijo["value"],inputs.variant1["label"],inputs.variant1["value"]);
    handlers();
}

export function calcularReserva(cantidad,costoFijoLabel,costoFijoValue,variantLabel1,variantValue1) {
    let roundCantidad = Math.round(cantidad);
    let disc = roundCantidad-cantidad;

    if (($w('#txtCostoFijo1').collapsed && costoFijoLabel !== "") || (disc !== 0)) {$w('#txtCostoFijo1').expand();  $w('#txtMonto2').expand()}
        else {$w('#txtCostoFijo1').collapse();  $w('#txtMonto2').collapse()}
    if ($w('#txtVariant1').collapsed && variantLabel1 !== "") {$w('#txtVariant1').expand();  $w('#txtMonto3').expand()}

    let valorUnit = values.valorUnitario || 0;
    $w("#txtMonto").text = $w("#txtMontoMobile").text = numberPesos(values.valorUnitario);
    let unidad = " ";
    if (cantidad === 1) {unidad = itemObj.unidadCantidad} 
    if (cantidad > 1) {unidad = itemObj.unidadCantidades}

    $w("#txtValorXCant").text = numberPesos(valorUnit)+" x "+roundCantidad+" "+unidad;
    values.importe1 = roundCantidad*valorUnit; $w("#txtMonto1").text = numberPesos(values.importe1);
    $w("#txtCostoFijo1").text = costoFijoLabel;
    values.costoFijo = costoFijoValue; $w("#txtMonto2").text = numberPesos(values.costoFijo);
    
    if (itemObj.txtPreVariant1) {
    $w('#txtVariant1').text = `${itemObj.txtPreVariant1} ${variantLabel1}`;
    } else {
        $w('#txtVariant1').text = variantLabel1;
    }

    $w("#txtMonto3").text = numberPesos(values.costoOpc);
    //If there is a discount for volume, it is calculated and displayed.
    if (disc !== 0) {
        let valueDiscounted = Math.round(valorUnit*disc);
        $w("#txtCostoFijo1").text = "Descuento";
        $w("#txtMonto2").text = "-"+numberPesos(valueDiscounted);
    }
    // Calculate neto and update txtMontoNeto and txtTotalMobile with its value
    const neto = values.neto = cantidad * valorUnit + Number(costoFijoValue) + Number(variantValue1);
    $w('#txtMontoNeto').text = $w('#txtTotalMobile').text = numberPesos(neto);
}

export function getRecProducts() {
    //Get the recommended (or related) products from the producto info. 

    wixData.queryReferenced("Productos", itemObj._id, "productosRecomendados")
    .then((results) => {
        if(results.items.length > 0) {
            recProducts = results.items;
            getCompanies();
        } else {
        // handle case where no matching items found
            console.log("This product has no related products.");
            $w('#line12').collapse();
            $w('#textRecProd').collapse();
            $w('#boxRecProducts').collapse();
        }
    })
    .catch((err) => {
        console.log(err);
    });
}

export function getCompanies() {
    wixData.query("Empresas")
    .limit(1000)
    .find()
    .then((results) => {
    if(results.items.length > 0) {
      empresas = results.items;
      loadRecProducts(recProducts);
    } else {
      console.log("No companies found.");
    }
  })
  .catch((error) => {
    let errorMsg = error.message;
    let code = error.code;
    console.log("Error: ",errorMsg);
  });
}

Any suggestion if very appreciated!

Hello. It is quite normal for the mobile performance score to be much lower than the desktop score. When Google checks your site, it simulates the mobile performance over a 3G cellular network. It seems to me that the average score for mobile sites is 30-40 on Wix.

There are a number of things you can do to improve it. One would be to move all images and videos below the “fold”.

This wix link may be useful to you.

That being said, I did notice a sharp drop in performance on my wix site around the end of October, despite making no changes.

If your webpage has a lot of Code, it could be taking longer to execute on mobile devices. You can try optimizing your Code by reducing the amount of code, or using techniques such as minification or tree shaking to reduce the size of the code. If your server takes a longer time to respond to requests, it could be affecting the load time of your webpage on mobile devices. You can try optimizing your server-side code or infrastructure to reduce the response time. You can try change your Code to reduce its size. This can be done by removing unnecessary whitespace and comments, and by shortening variable and function names. You can use the “async” and “await” keywords to make your code more readable and easier to understand. This can help improve the maintainability of your code.

Checkout @ kristinabell123 Link :slight_smile:

Thanks Kristina for the response! It makes sense.

Thanks for the suggestions!