Server-side and client-side data processing

I use PHP to output financial data from yahoo. Then I send the data in JSON format to one of my block blogs and receive it using JavaScript.

Is it faster to process the data on the server side and then send a subset of JSON to JavaScript. Or would it be better to send all this and then process it using JavaScript on the client side?

How to find out how to do this compromise analysis yourself?

+3
source share
3 answers

Mostly a good grade. Sending large amounts of data to the client for processing will incur overhead costs of the client and make their viewing less acceptable. Processing a data server server will increase the load on your server to the client.

This is a common situation when large data tables are sorted or paginated. You can do this completely in a browser or enable server-side sorting and questioning. My rule of thumb is that if I have more than 10 thousand cells (10 columns x 1000 rows), then I probably should enable server-side processing, and not leave it to the client. This is especially true for older machines with slow JavaScript shitty mechanisms .

+5
source

, , , . - , .. ..

, , JavaScript . , , - .

+1

, . , Yahoo! JSON HTML.

(.. javascript), , - , .

, - . :)

0

Source: https://habr.com/ru/post/1792825/


All Articles