function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AK_SmithAK_Smith 

Draining battery issue

Hello! I need and advice. 
According to our users, we have some draining battery issues on our iPads. 
After we switched to the Salesforce mobile battery discharges faster (30% - 50% faster).
I have a feeling that it could be because we have 2 lightning pages full of LWC. We even tried to hide them and users reported that subjectively battery discharges slower.

Could it be something in our code? 
AK_SmithAK_Smith
Apex class
public with sharing class PharmaActivityCalendarController {
    @AuraEnabled(cacheable=false)
    public static List<CTPHARMA__Activity__c>
    getActivities(){
        return [SELECT ID,
                       Time_Mobile__c, 
                       Record_Type_name__c, 
                       ContactName_From_Reference__c, 
                       Account_Name__c, 
                       Color_ID__c,
                       CTPHARMA__Status__c 
                FROM  CTPHARMA__Activity__c WHERE IsMine__c = TRUE AND CTPHARMA__StartDate__c = TODAY
                ORDER BY CTPHARMA__StartDate__c
        ];

    }
}
LWC
<template>
  <lightning:card title="Календарь активностей">
    <!-- <lightning-button
      variant="brand"
      label="Создать активность"
      title="Primary action"
      onclick={openActionWindow}
      class="slds-m-left_x-small"
    ></lightning-button> -->
    <div style="text-align: center">

    <a
      target="_blank"
      class="slds-button slds-button_brand"
      href="/lightning/n/CreateActivity"
      >Создать активность
      </a    ></div><BR>

      
   
    <template if:true={activities}>
      <template for:each={activities} for:item="action">
        <div key={action.Id} class="list">
          <div class={action.Color_ID__c}>
            <a href={action.url} target="_blank">
              <p>{action.Time_Mobile__c}</p>
              <p>{action.Record_Type_name__c}</p>
              <p>{action.ContactName_From_Reference__c}</p>
              <p>{action.Account_Name__c}</p>
            </a>
          </div>
        </div>
      </template>
    </template>
  </lightning:card>
</template>

JS
import { LightningElement, track } from "lwc";
import getActivities from "@salesforce/apex/PharmaActivityCalendarController.getActivities";
const getUrl = (act) => {
  return act.map((item) => ({
    ...item,
    url: `/lightning/r/CTPHARMA__Activity__c/${item.Id}/view`
  }));
};
export default class Calendar extends LightningElement {
  }
  @track activities;
  @track error;
  connectedCallback() {
    this.handleLoad();
    // this.openActionWindow();
  }
 }
  //result display and error handle
  handleLoad() {
    getActivities()
      .then((result) => {
        this.activities = getUrl(result);
        //console.log("Data", this.activities);
      })
      .catch((error) => {
        this.error = error;
        console.log(error);
      });
  }
}