firefox-devtools / firefox-devtools/profiler
Consider stripping symbolServer parameter from Permalink URL
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 491
- Avg merge
- 3d 46m
- Merged PRs (30d)
- 27
Description
The `symbolServer` URL parameter is used when `profiler-symbol-server` or `perfrecord` open a local profile in the browser. It is often set to `http://127.0.0.1:3000` or similar. The symbol server is used for the following purposes:
* During symbolication, to serve symbols. (Obviously.)
* After symbolication, to serve source code from local files. Once we have a source view, that is.
* After symbolication, to serve assembly code from local binaries. Once we have an assembly view, that is.
The `symbolServer` parameter mainly serves as an "input" parameter - once the profiler's internal state knows about the value, there is limited value for keeping it in the URL.
But there is some value to keeping it in the URL! It means that you can reload the page without dataloss at any point:
* If you reload before uploading the profile, reloading obtains a fresh profile and runs symbolication again. With `symbolServer` in the URL, you get correct symbols in the reloaded page.
* If you reload after uploding the profile (i.e. if your URL is `.../public/...&symbolServer=...`), you still get source code and assembly code in the reloaded page.
However, once the uploaded profile is shared with somebody else, there is no value in having the symbol server in the shared URL. On somebody else's machine, trying to get source code from `http://127.0.0.1:3000` is not going to work.
So, how can we remove it from the shared URL without breaking the page reload case? I think we can just adjust the URL that we feed to bitly. We do something similar to replace localhost:4242 with profiler.firefox.com, thought that sometimes causes problems.
┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-478)
Contributor guide
Assessment
This issue has not been assessed yet.