Tips for resolving a time-expired issue in JavaScript

I am facing an issue with the delay in receiving results after sending data to Google Sheet from my mobile application.

The data transfer is successful, but the JavaScript code takes too long (around 360s) to provide a response. Here is the snippet of my code:

In this code snippet, I'm trying to update user information in Google Sheets based on the provided email and password. However, the process seems to be taking longer than expected to execute.

it's ok

var ss = SpreadsheetApp.openByUrl("https://docs.google.com/spreadsheets/d/177kUZc61U8huVsq2OcGsiF2OGdPCSxMjkoh2C4KIWPM/edit#gid=0");
var sheet = ss.getSheetByName('Info');

function doGet(e) {
    var action = e.parameter.action;

    if (action == 'UpdateInfo') {

        //return UpdateInfo(e);
    }
}

function doPost(e) {
    var action = e.parameter.action;

    if (action == 'UpdateInfo') {
        return UpdateInfo(e);
    }
}

// More functions and logic for updating user info in Google Sheets...

Answer №1

Perhaps it's worth taking a look at the dimensions of your "profile_pic.jpg" image. From what I've noticed, images taken with a mobile app camera tend to be quite large in size. If left uncompressed, uploading such a high-resolution image can become quite laborious and time-consuming (a smaller image would suffice for a profile picture, and compression is key).

Therefore, it may be beneficial to confirm the size of the image you plan on uploading and remember to compress it if it's too hefty.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What steps should I take to establish routes in my node and express application that allow for authentication through a designated method?

Currently, I am following the backend set up tutorial from auth0, and I have a question regarding how to organize my routes in a separate file rather than in the app.js. In the tutorial, they demonstrate var authenticate = jwt({ secret: new Buffer(proc ...

Can one upload a file through ExtJS 4 without using a form?

Is there a way to upload a file without submitting a form in ExtJS 4? If so, how can this be achieved? Thank you. ...

Display TypeScript console log exclusively during development mode

Can console logs in TypeScript/JavaScript be selectively outputted based on Webpack bundling mode? I frequently use comments for status messages in my app and do not want to remove them for production versions. ...

Is it possible to prevent the tab key from advancing?

On my form, each page slides over to a new one. I've noticed that if a user continues to press tab at the end of one div, it jumps into the next hidden div that should only be viewed if a button is clicked. Is there any way to prevent the tabbing beyo ...

javascript alter css property display to either visible or hidden

I am struggling with a CSS id that hides visibility and uses display: none. The issue arises when I want the element to be visible upon clicking a button, but removing the display:none property is causing design problems due to it being an invisible elemen ...

Uniform distribution of resources across all nodes

I'm currently implementing navigation in my application using React BrowserHistory. I want all files to be served from my Node server regardless of the URL path being accessed. This is the code for my server: const http = require('http'); ...

Testing the material-ui toggle component by simulating a click event

Trying to test functionality based on the material-ui toggle component with jest and enzyme has been challenging for me. Even though my generic clickIt function usually works well with other material-ui components, it doesn't seem to trigger the stat ...

Having trouble parsing an array from Alamofire in iOS using SwiftyJSON? You may encounter null values while attempting to parse

Here is the response from the API request: [ { " ..... I am currently using SwiftyJSON to parse the data received from an Alamofire request: let json = JSON(data) let mapHeir = json[0]["Info"]["String"] print(mapHeir) However, I am facing ...

Navigate your cursor over the dynamically generated link

I am struggling to create a hover effect similar to the example here in jQuery because the link is being dynamically generated. Here's what I've tried: $(document).ready( function() { $('a.g-tabs').on('hover', 'a&ap ...

The alignment issue persists when attempting to set 'relative' on the parent and 'absolute' on the inner element in a Bootstrap column for bottom alignment

Here is a snippet of my basic HTML code: <div class = "row"> <div class = "col-xs-8"> <p>long long long long text that generates a taller column</p> </div> <div class = "col-xs-4"> <p> ...

Passing a variety of values from child to parent component in Angular through a unified function

Utilizing a checkbox-component within a parent component, I have implemented an @Output() to notify the parent component when the value changes. While my code is currently functional, using the checkbox-component multiple times throughout my project has l ...

Customizing Marker Clusters with ui-leaflet: A guide on changing marker cluster colors

I'm trying to customize the markerCluster color in a non-default way. I've been exploring the API and it looks like the recommendation is to modify a divIcon after creation, possibly like this: var markers = L.markerClusterGroup({ iconCreateFunc ...

Implementing Angular CDK for a dynamic drag-and-drop list featuring both parent and child elements

I'm currently working on setting up a drag and drop list within Angular using the Angular CDK library. My goal is to create a list that includes both parent and child elements, with the ability to drag and drop both parent items as well as their respe ...

Tips on showing a specific div when a button is clicked using jQuery and Bootstrap

In my button group, I have four buttons and I need one specific button to display certain div content when clicked. The displayed content should be based on which button is clicked. Is there a way to achieve this using Twitter Bootstrap jQuery in ASP.NET ...

The mystery of the Accordion Effect: A Next.js/React.js issue where it slides up but refuses to

After implementing a custom accordion using next.js, I encountered an issue where the slide animation worked successfully when moving up and out upon clicking the button. However, when trying to move it back down into the content, it did not animate as exp ...

Guidelines for accurately and appropriately creating divisions in JavaScript using mathematical principles

The program occasionally generates mathematically incorrect divisions, such as 2/0, and does not accept rounded answers like 0.33 or 0.33333 for "1/3". What modifications should I make to the code? Thank you for your assistance and time. document.getEl ...

Tips for updating an object variable dynamically in an Angular application

const person = { "name": "jacob", "age": 22 } I am looking to dynamically update it to: { "name": "jacob", "age": 22, "dob": number } ...

The output of an AngularJS function call is an object, not a string

Having trouble returning a usable string from the function below? Here is the code: app.factory('Urls', ['$http', function($http) { var urls = {}; urls.getUrls = function () { return $http.get('json/dataUrls.json ...

What is the process for removing a specific row from a datatable?

I have implemented a data-table using Vue and Vuetify. When I click on the delete icon in a specific row, a snackbar pops up with two buttons - yes and no. If I click on the yes button, I want to delete that specific row. How can I achieve this functionali ...

Receiving Array Data from JSON and Listing Results

Once I retrieve the first row result from a JSON array, I want to display all the results using the jQuery each method. Here is the code snippet: $(document).ready(function () { $("#btnsearch").click(function() { valobj = $('#search_box' ...