Repository navigation
Describe plugins with profile files that need no release - #82
linghengqian wants to merge 2 commits into
Conversation
What the application knows about particular plugins was Go code, so adapting a plugin, or a new release of one, needed a release of the application. The profiles of the 20 plugins are now JSON files (shared/profile/plugins, with a schema), whose format 2 adds parts for some platforms, version names read by regular expressions, filters that match a pattern, and switch and text variables. For an installed plugin, each section of a profile comes from the first of the user's files, the profile that the plugin ships as lib/vfox-plus.json, the online directory (this repository's main, at most once a day, checked by SHA-256), the files of the application, and inference. A profile may not set variables that change what runs, its links and preset addresses are https only, and the interfaces ask before they set a value that the application did not ship. Detect and link is offered only for plugins that can detect. vfxtool profile lints profiles, for plugin repositories through a reusable workflow too, and indexes the online directory. A setting inferred from a plugin that takes text can be set now, and the filters inferred for a profile that declares none filter the list.
The format of the profile files, where they come from and what they may not do, in English and Simplified Chinese, with the changes of the web API, the interface specification and the user guide.
Memory use at
|
| Implementation | Technology | Processes | Home PSS | Home RSS | Versions PSS | Versions RSS | The list adds (PSS) |
|---|---|---|---|---|---|---|---|
| mygo | mygo 0.9.0, Go 1.27.4, GTK 3 (purego), CPU renderer | 1 | 50 (+2) | 63 | 54 (+2) | 69 | +4 |
In MB, for the application and all of its child processes, sorted by the PSS of the Home page; "Versions" is the SDKs page with the available versions of Node.js listed. A number in parentheses is the difference from main, in bold when it is more than the noise of CI. "(main)" marks an implementation that this pull request did not rebuild: its numbers are those of main.
Lightweight mode
What the application uses with the web interface on and its window closed, with the fake vfox, in MB for the application and all of its child processes: lightweight-idle is settled with no browser, lightweight-loaded with a paired browser past its first inventory over server-sent events (vfxtool measure-lightweight). A change is judged by the private memory, the heap and the stacks, and only by a difference of more than the larger of 2 MB and 5 % of main. The resident and the proportional memory include the pages of files that the system takes back, so they are shown without a judgement.
| Measure | This pull request | Main |
|---|---|---|
| Idle RSS | 49 MB (+1) | 48 MB |
| Idle PSS | 36 MB (+1) | 35 MB |
| Idle private memory | 14.4 MB (+0.4) | 14.0 MB |
| Loaded RSS | 51 MB (+1) | 50 MB |
| Loaded PSS | 38 MB (+1) | 37 MB |
| Loaded private memory | 14.6 MB (+0.4) | 14.2 MB |
Phone app
What the release APK uses cold-started on an emulator, in MB from dumpsys meminfo after settling: apk-cold. Emulator boots vary, so only differences of more than 5 MB and 10% count as changes.
| Measure | This pull request | Main |
|---|---|---|
| Cold RSS | 169 MB (+27) | 142 MB |
| Cold PSS | 46 MB (-2) | 48 MB |
Details
- Measured by
vfxtool measurein the workflow of the implementation, on a GitHub-hosted runner with Xvfb and no GPU. These are not the numbers ofdocs/en/dev/memory.md, which come from another machine: compare the rows of one comment. - The same code does not use the same memory in every CI run, so a difference counts as a change only when it is more than 5 MB and more than 5% of the number on main.
- Runs of this pull request: mygo.
- Latest runs on main: mygo (
29ebaf0).
|
Folded into #79: the whole rework goes into that pull request, not into a stack of them. Its branch gets the two commits of this one, |
The second step of the rework, stacked on #79. What vfox+ knows about particular plugins is now data instead of Go code, so adapting a plugin, or a new release of one, needs no release of the application.
What changes
shared/profile/plugins, with a JSON Schema. Format 2 adds parts for some platforms (when), version names read by regular expressions instead of two hard-coded namings, filters that match a pattern, andtoggleandtextvariables.docs/en/dev/profiles.mddescribes it.profiles/<plugin>.json; the plugin's ownlib/vfox-plus.json(vfox packslib, so it arrives with the plugin and works offline); the online directory (shared/profileon this repository's main: fetched at most once a day, through the update mirror, only the files that differ, each checked by SHA-256); the files the application ships; and inference. The unusedFetchProfileand the rootvfox-plus.json, which no packaged plugin could carry, are gone.PATH,HOME,LD_*,NODE_OPTIONS, compilers, proxies, tokens, …); documentation links and preset addresses arehttps://; and a value that the application did not ship is shown and confirmed before it is set, on the desktop, the web interface and the phone app.togglevariables, a text field fortextones; "Detect and link" is hidden for a plugin whose files show it has no Detect hook.vfxtool profile lint(with--pluginfor the profile of a plugin, and a reusable workflow,profile-lint.yml, for plugin repositories) andvfxtool profile index.Compatibility
profile.naming, which no client used, and addscapabilities,unvetted,onandoff. Older phone apps keep working; a newer one takes a missingcapabilitiesas able to detect.namingstring, a search without a default) comes from the next source instead.shared/profile/index.jsonfrom main at most once a day, as it already asks GitHub for its latest release at startup. Until this lands, main has no such file, and the request fails without effect. The end-to-end build does not use the network for it.Verification
vfxtool profile lintagainst the main branch of their plugin, and validate against the schema.go vet,go test -racewith the coverage gate (core and state 87 %, ui 86 %), the census of the screens,golangci-lint2.15.0 (default ande2etags), the tests and Windows vet ofshared/tooling, and the type check, tests and build of the web interface.fake,real(vfox 1.1.0),python,pluginsandtray.vfxtool docs-check, markdownlint and actionlint.Not verified yet