| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
build: enable more performance-* clang-tidy checks (#54024) * build: enable more performance-* clang-tidy checks * chore: performance-prefer-single-char-overloads Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: performance-unnecessary-copy-initialization Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: performance-use-std-move Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: performance-move-const-arg Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: performance-no-automatic-move Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: address review feedback Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MC6nEgyED2MtseZ9KdGMpt * chore: fix new clang-tidy performance findings Address performance-use-std-move, performance-move-const-arg, and performance-prefer-single-char-overloads findings in code that landed on main since the previous base. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MC6nEgyED2MtseZ9KdGMpt * chore: fix new clang-tidy performance findings on macOS Silence performance-unnecessary-copy-initialization for task runners captured by Objective-C blocks in the macOS file and message box dialogs, matching the existing pattern: the copy is needed since a block would otherwise capture the reference by reference. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MC6nEgyED2MtseZ9KdGMpt --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 3 天前 | |
build: enable more performance-* clang-tidy checks (#54024) * build: enable more performance-* clang-tidy checks * chore: performance-prefer-single-char-overloads Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: performance-unnecessary-copy-initialization Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: performance-use-std-move Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: performance-move-const-arg Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: performance-no-automatic-move Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: address review feedback Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MC6nEgyED2MtseZ9KdGMpt * chore: fix new clang-tidy performance findings Address performance-use-std-move, performance-move-const-arg, and performance-prefer-single-char-overloads findings in code that landed on main since the previous base. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MC6nEgyED2MtseZ9KdGMpt * chore: fix new clang-tidy performance findings on macOS Silence performance-unnecessary-copy-initialization for task runners captured by Objective-C blocks in the macOS file and message box dialogs, matching the existing pattern: the copy is needed since a block would otherwise capture the reference by reference. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MC6nEgyED2MtseZ9KdGMpt --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 3 天前 | |
fix: improve asar archive path handling (#55173) * fix: improve asar archive path handling Treat an app's asar archive the same way in every process, so helper processes resolve it against the app bundle and agree with the browser process about what is at that path. * fix: keep asar prefix lookups in sync with opened archives Make JavaScript fs lookups treat a path as an archive once it has been opened as one, even if that path was earlier seen as a directory. | 5 天前 | |
refactor: enable modernize-use-nullptr clang-tidy check (#53057) * refactor: enable modernize-use-nullptr clang-tidy check * refactor: convert remaining NULL uses to nullptr in Windows code * refactor: remove dead store in GetLoginItemSettingsHelper --------- Co-authored-by: Claude <noreply@anthropic.com> | 2 个月前 | |
fix: improve asar archive path handling (#55173) * fix: improve asar archive path handling Treat an app's asar archive the same way in every process, so helper processes resolve it against the app bundle and agree with the browser process about what is at that path. * fix: keep asar prefix lookups in sync with opened archives Make JavaScript fs lookups treat a path as an archive once it has been opened as one, even if that path was earlier seen as a directory. | 5 天前 | |
perf: speed up fs operations on paths inside asar archives (#53852) * perf: make fs operations on paths inside an asar archive cheaper than real files Loading modules from app.asar was measurably slower than loading the same files from disk because every stat/realpath/readdir on an archive path paid for a native path split that built a V8 dictionary, a fake Stats array built through the slow iterable path, and a real realpath() of the archive file. - splitPath: find the archive prefix in JS and memoise the native verdict per prefix, with a last-prefix fast path; skip path.normalize() for already normalized absolute POSIX paths. - internalModuleStat: consult the module stat cache before splitting the path. - Fill a shared scratch Float64Array/BigInt64Array for Stats instead of allocating one from a JS array per call. - Memoise the archive file's own realpath per archive; honour the `encoding` option for asar realpath results (previously threw for 'buffer'). - readdir(withFileTypes)/opendir: one native readdirWithTypes() call instead of a stat per child. - Native: allocation-free header walk over string_view, a per-archive path->node memo, zero-copy ASCII path arguments, and DictionaryTemplate results for stat()/getFileInfo(). - Wrap child_process eagerly instead of through a Module._load hook (init.ts already requires it; the hook taxed every require() and missed ESM imports of node:child_process). - Read ELECTRON_LOG_ASAR_READS once. * perf: locate the archive component of a path natively in one call Replace the JS-side prefix memo and normalization regexes in the asar fs wrapper with a lean native asar.splitPath(): it reads the path without copying when it is ASCII, walks the components once, memoises "is this *.asar prefix an archive file" by string, and reports when the path has "."/".."/empty components so the caller can path.normalize() and ask again (user-supplied paths only; the module loader's are already normalized). The JS splitPath() is reduced to the type coercion, the /\.asar/i pre-check that keeps unrelated paths out of native code, the call, and two slices. Spec coverage for the binding is updated to the new integer contract and a wrapper-level test for un-normalized archive paths is added. * test: cover native asar path splitting and archive lookups; fix edge cases Add an "internals" suite to asar-spec that builds its own archives (nested directories, link chains and cycles, non-ASCII names, an upper-case .ASAR, an archive inside a real directory named *.asar, a bogus *.asar file) and exercises the electron_common_asar binding directly: splitPath() prefix detection and its normalization contract, Archive.stat/getFileInfo/readdir/ readdirWithTypes/realpath, the lookup memo past its size limit, concurrent use from worker threads, and the fs wrapper on Buffer/URL/relative/ un-normalized paths. Fixes found while writing them and by review: - splitPath() returned a UTF-8 byte offset; report UTF-16 code units so an archive under a non-ASCII directory splits correctly. - Decide "needs normalization" lexically before probing the disk, and ignore any number of trailing separators. - internalModuleStat goes through the normalizing splitPath() again so un-normalized NODE_PATH / require.resolve({ paths }) entries keep working. - Keep separate archive realpath memos for realpath() and realpath.native(). - Skip empty components in the archive header walk. - Read ELECTRON_LOG_ASAR_READS per call again so it can be set from main.js. * fix: keep un-openable and not-yet-existing *.asar paths behaving as before Follow-ups from review of the asar fast path: - Native splitPath() now rejects paths containing control characters, as the base::FilePath converter used by Archive::New() does, so an .asar file under such a directory stays an ordinary file instead of an "Invalid package". - IsDirectoryCached()/IsArchivePrefix() only memoise answers for paths that exist. A *.asar path probed before anything is created there (the win32 mkdir wrapper does this) is re-evaluated later instead of being pinned as an archive for the life of the process. This predates the branch for IsDirectoryCached(). - getFileInfo() fills the integrity slot with undefined when absent so the DictionaryTemplate result keeps using its cached map. - Spec: create the *.asar-named fixture directory through original-fs, derive the realpath.native expectation with the native flavour (8.3 temp paths on Windows runners), and cover the cases above. * perf: read ELECTRON_LOG_ASAR_READS once per process process.env goes through Node's env interceptor (getenv under a lock) and the flag was checked on every read of a packed file. Sample it at startup instead and document that it must be set in the launching environment. | 1 个月前 | |
feat: validate integrity of ASAR Integrity dictionary on macOS (#48587) | 11 个月前 | |
feat: validate integrity of ASAR Integrity dictionary on macOS (#48587) | 11 个月前 | |
build: enable more performance-* clang-tidy checks (#54024) * build: enable more performance-* clang-tidy checks * chore: performance-prefer-single-char-overloads Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: performance-unnecessary-copy-initialization Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: performance-use-std-move Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: performance-move-const-arg Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: performance-no-automatic-move Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * chore: address review feedback Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MC6nEgyED2MtseZ9KdGMpt * chore: fix new clang-tidy performance findings Address performance-use-std-move, performance-move-const-arg, and performance-prefer-single-char-overloads findings in code that landed on main since the previous base. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MC6nEgyED2MtseZ9KdGMpt * chore: fix new clang-tidy performance findings on macOS Silence performance-unnecessary-copy-initialization for task runners captured by Objective-C blocks in the macOS file and message box dialogs, matching the existing pattern: the copy is needed since a block would otherwise capture the reference by reference. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MC6nEgyED2MtseZ9KdGMpt --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> | 3 天前 | |
chore: replace absl::optional<T> with std::optional<T> (#40928) * chore: replace absl::optional<T> with std::optional<T> * IWYU | 2 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 天前 | ||
| 3 天前 | ||
| 5 天前 | ||
| 2 个月前 | ||
| 5 天前 | ||
| 1 个月前 | ||
| 11 个月前 | ||
| 11 个月前 | ||
| 3 天前 | ||
| 2 年前 |