catapult-project / catapult

Deprecated Catapult GitHub. Please instead use http://crbug.com "Speed>Benchmarks" component for bugs and https://chromium.googlesource.com/catapult for downloading and editing source code..
https://chromium.googlesource.com/catapult
BSD 3-Clause "New" or "Revised" License
1.93k stars 563 forks source link

Javascript Modules #4120

Open tdresser opened 6 years ago

tdresser commented 6 years ago

Should we switch to JS modules at some point? It feels like a necessary step to code sharing more with devtools / lighthouse, and would simplify some things a bunch.

It would also be a bunch of work, but it isn't clear to me how much. Y'all will probably have a better intuition for how much time this would take.

eakuefner commented 6 years ago

We will definitely need to do this if we want to start using TypeScript, and I do think it's on the backlog (after all, we already know we need to do this in order to move away from HTML imports).

Tim, can you say more about what kind of codesharing you want to see with devtools/lighthouse and how they're using modules?

tdresser commented 6 years ago

They aren't using modules yet, but the game plan is to do so eventually.

We and lighthouse both process a lot of traces. I hypothesize that we'll want to share some of the logic for trace processing at some point, but I don't have any particularly concrete use cases in mind at the moment.

I'm also keen on enabling migrations of small parts of the codebase to TypeScript.

agnjunio commented 6 years ago

Any updated on this topic? It's getting more critical as the polyfills (webcomponents v2) aren't supporting HTML imports anymore.

tdresser commented 6 years ago

I care somewhat less about this in the short term, as Perfetto will result in us authoring metrics in a completely different way (eventually). I think from the metrics end of things, it doesn't make much sense to think about unification until we've got the perfetto strategy in place.

I think UI folks should probably figure out how to prioritize this.

agnjunio commented 6 years ago

First of all, thanks for your quick answer :+1:

@tdresser Just to see if I understood corretly: will traceviewer be replaced by Perfetto? Do you have an insight on when this will happen? My main interest is in the frontend part. I'd like to know if there is any schedule on the release for this new Perfetto frontend.

tdresser commented 6 years ago

There is work underway on a new trace viewer UI for Perfetto.

We don't have super concrete timelines yet. @deepanjanroy - what's the target for an initial release?

deepanjanroy commented 6 years ago

We have end of Q3 as an optimistic target for the v0 release, but it will take longer for it to be generally usable.