close
close

Page 3: Vergleich von Updategeschwindigkeiten

Page 3: Vergleich von Updategeschwindigkeiten

In order to simulate the different network speeds, the example uses Network Throttling of Google Chrome Browsers. With Network Throttling is the simulation of a website that is not possible due to network speeds.

Display


If you want to use the browser developer tools yourself, you can use the browser developer tools and on the network tab use the Throttling menu with the desired Throttling profile. The updated version lacks the leveraged hook design useMeasureTime in the utils.ts files:

import { useEffect, useState } from "react"

export const useMeasureTime = (props: { variableToChange?: number }) => {
  const (time, setTime) = useState(null)
  const (timePassed, setTimePassed) = useState(null)

  useEffect(() => {
    if (time === null) return

    const end = performance.now()
    setTimePassed(end - time)

    setTime(null)
  }, (props.variableToChange))

  const startMeasuringTime = (t: number) => setTime

  return {
    timePassed,
    startMeasuringTime
  }
}

The hook lacks the JavaScript Performance API available to perform the execution startMeasuring-Method and the Change of the variableToChange-Ownership. If variableToChange The Number of Stars is used.

The following table shows the updated updates with a recurring update at various network-fast updates.

Table: Comparative averages Update vs. Update with fast and slow 3G throttling profiles

Here it is so that it does not succeed to perform a simultaneous network speed possible updates (three milliseconds). I think this is a usual. Update deutlich langsamer as a maximum. The operation will start with the slowing down of Network speeds.

Optimistic user interface updates for useful and German interaction. When the normal operation of the network is disrupted, it is so that you increasingly tend to work. This German translation is based on the Apollo Client Library with the ability to read. The Edge Cases are automatically removed by the library.

If it fails, it works as an optimistic update pattern in one’s own application to integrate and dispel the knowledge that brings about a detrimental interaction – a connection that occurs in a region with a long-term internet connection.


(May)