Giter VIP home page Giter VIP logo

Comments (8)

oyiptong avatar oyiptong commented on May 16, 2024

Sample Measurements:

  • Number of db queries per page load
  • Time to fully load a page (page load latency)
  • Request/response cycle response time

from activity-stream.

oyiptong avatar oyiptong commented on May 16, 2024

There are some notifications we need from UI, at least for responsiveness and some latency measurements

from activity-stream.

mzhilyaev avatar mzhilyaev commented on May 16, 2024

@oyiptong - need clarification on your points

  1. Number of db queries per page load
    Does this mean any API call to PlacesProvider? For example, there's a delete query, do we count that? Do you care for individual query times?
  2. Time to fully load a page (page load latency)
    I believe time diff between page "open" and "pageshow" (or "ready") tab invents gives this difference.
    (@emtwo, could you verify that statement. If not I will run some tests to see when tab events fire, but if you already had done it, perhaps you can share the results)
    We could introduce an extra notification from content if and when it knows that page is fully loaded.
    I suspect this function would be a good candidate to notify from: https://github.com/mozilla/activity-streams/blob/master/content-src/components/Base/Base.js#L14
  3. Request/response cycle response time
    Do you mean specifically PlacesProvider calls, as they seem to be the only API doing request/response cycle. Again, do we care for individual queries, or just the average?

from activity-stream.

mzhilyaev avatar mzhilyaev commented on May 16, 2024

@emtwo
TabTracker seems to be a good candidate to park telemetry data.
Do you have any objections against parking performance data next to tab sessions?
For example, it may have a method
logQueryTime: function(tab, query, time) {
...
}

May this work?

from activity-stream.

oyiptong avatar oyiptong commented on May 16, 2024

Does this mean any API call to PlacesProvider? For example, there's a delete query, do we count that? Do you care for individual query times?

The first number we want is the number of DB queries called for each page load. This is useful so we have a number to diminish if we need to.

We can also capture individual query times so we know which to optimize.

We can perhaps logs those query times as a debug statement. (we might need to relax the linter to do so).
A console output toggle-able by a pref would probably make sense here.
It might be interesting to know what the number of queries are for different load reasons.

I don't see much value in sending the # of DB queries as a telemetry ping, because they won't change much. The response times might be interesting to send/analyze, but we won't have the correct data processing at the moment given our timeline yet.

Time to fully load a page (page load latency)

Browser events won't be enough. We'll need the react/redux front-end to tell us when the page is "fully loaded". By "fully loaded", I mean that the page is ready to be used by the user. My intuition tells me that react/redux adds some latency. The browser events will just tell us that either: the document's DOM has loaded, but as we know, it initially loads a minimal DOM, then redux/react take over and add DOM elements dynamically.

We'll need content to send a message to chrome when it thinks it's done. I would say, it happens when all data has been received, DOM elements created and rendered on screen, with the page ready to listen to user input. Let's for now leave image loading out of the equation.

This data might be easily stored in our data back-end as it would just be a column.

Request/response cycle response time
Do you mean specifically PlacesProvider calls, as they seem to be the only API doing > request/response cycle. Again, do we care for individual queries, or just the average?

If we have individual query timings, granular information for this is probably not useful.
This could be just an experiment (not code), just to see if message passing latency is even worth keeping track of.

from activity-stream.

oyiptong avatar oyiptong commented on May 16, 2024

TabTracker seems to be a good candidate to park telemetry data.
Do you have any objections against parking performance data next to tab sessions?
For example, it may have a method
logQueryTime: function(tab, query, time) {
...
}

May this work?

I agree that Tab Tracker may be a good place to park this data. Keep in mind we want to keep most of this data separate from what we'll send out to our telemetry servers. For now, we'll print out most of it, preferably under a pref... "debug" mode perhaps.

from activity-stream.

emtwo avatar emtwo commented on May 16, 2024

@mzhilyaev I'm not keeping track of load latency so you can go ahead and work on that. I think it's fine for now to collect the data in TabTracker, but I'm not sure where we expect it to go next if it won't be sent to Telemetry servers, @oyiptong?

Do we not want to send perf data at all? or do we want to send it as a separate ping?

from activity-stream.

oyiptong avatar oyiptong commented on May 16, 2024

For now, logging to the console is fine.
We'll figure out what we want to send and how next.

There is value tracking the performance from a development standpoint. We might want more time on the server data back-end to collect and track performance data.

from activity-stream.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.