CARVIEW |
Select Language
HTTP/2 200
date: Fri, 10 Oct 2025 13:38:54 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/karma-runner/karma.git
etag: W/"814bac3473a96ee431a54464db408f1c"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=%2BFTMWRBnoroX5eAUVOhAfUL%2F2VZngJK32D42DMiR4c%2BJOVASpaUxyv%2BoHeJRQ%2FvXfnhWoUyBpxqpyjYtuJ0HACbWDSqYdMF%2BfZI9S5fEqTNp%2BzB9sYU6Cd1Gf%2B4hksmx13N3Wrx9%2FV%2Fhs5b1gmR3ZLr0kC7PTEMB7JBgPfKeA7yqYucDH2UnSelS0kK1hER0BoDgzLZYprmRnxIoCvJTSWnofBsE4vRirWzNvtgJhuHr0A96RvkmqhCWyXd1IS0lShcR5HIjjYnD91dA0NVEVA%3D%3D--7NF17sN97wJDdLqN--uMmtff4zpfNZrGtyLOfs4w%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1506092767.1760103533; Path=/; Domain=github.com; Expires=Sat, 10 Oct 2026 13:38:53 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sat, 10 Oct 2026 13:38:53 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: E114:338CFA:7C6F30:8B2B71:68E90C6D
feat(web-server): cache preprocessed files · karma-runner/karma@c786ee2 · GitHub
Copy file name to clipboardExpand all lines: lib/middleware/source-files.js
Copy file name to clipboardExpand all lines: test/unit/middleware/source-files.spec.coffee
Copy file name to clipboardExpand all lines: test/unit/preprocessor.spec.coffee
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit c786ee2
committed
feat(web-server): cache preprocessed files
Now Karma does not write preprocessed files into disk (as the web server would read them) and store that in memory. Especially when running with multiple browsers (each browser has to fetch the file), this saves FS access (1 write per preprocessed file; x reads per preprocessed file, where x is number of captured browsers).
This is in trade for slightly higher memory usage. I however tried AngularJS with this change (forcing all the files to be processed/cached) and the memory consumption was not significantly higher.
We can optimize this to clean up the cache, especially if there is only a single browser captured1 parent c9a64d2 commit c786ee2Copy full SHA for c786ee2
File tree
Expand file treeCollapse file tree
5 files changed
+53
-40
lines changedFilter options
- lib
- middleware
- test/unit
- middleware
Expand file treeCollapse file tree
5 files changed
+53
-40
lines changedCollapse file: lib/middleware/common.js
+17-2Lines changed: 17 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
29 |
| - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
30 | 32 |
| |
31 | 33 |
| |
32 | 34 |
| |
33 | 35 |
| |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
34 | 49 |
| |
35 | 50 |
| |
36 | 51 |
| |
| |||
39 | 54 |
| |
40 | 55 |
| |
41 | 56 |
| |
42 |
| - | |
| 57 | + | |
43 | 58 |
| |
44 | 59 |
| |
45 | 60 |
| |
|
Collapse file: lib/middleware/source-files.js
lib/middleware/source-files.js
Copy file name to clipboardExpand all lines: lib/middleware/source-files.js+2-2Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 |
| - | |
| 40 | + | |
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
48 |
| - | |
| 48 | + | |
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
|
Collapse file: lib/preprocessor.js
+3-8Lines changed: 3 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
2 | 1 |
| |
3 | 2 |
| |
4 | 3 |
| |
5 | 4 |
| |
6 | 5 |
| |
7 | 6 |
| |
8 |
| - | |
9 |
| - | |
10 |
| - | |
11 | 7 |
| |
12 | 8 |
| |
13 | 9 |
| |
| |||
23 | 19 |
| |
24 | 20 |
| |
25 | 21 |
| |
26 |
| - | |
27 |
| - | |
28 |
| - | |
29 |
| - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
30 | 25 |
| |
31 | 26 |
| |
32 | 27 |
| |
|
Collapse file: test/unit/middleware/source-files.spec.coffee
test/unit/middleware/source-files.spec.coffee
Copy file name to clipboardExpand all lines: test/unit/middleware/source-files.spec.coffee+28Lines changed: 28 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| 15 | + | |
15 | 16 |
| |
16 | 17 |
| |
17 | 18 |
| |
| |||
133 | 134 |
| |
134 | 135 |
| |
135 | 136 |
| |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + |
Collapse file: test/unit/preprocessor.spec.coffee
test/unit/preprocessor.spec.coffee
Copy file name to clipboardExpand all lines: test/unit/preprocessor.spec.coffee+3-28Lines changed: 3 additions & 28 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
15 |
| - | |
16 |
| - | |
17 | 14 |
| |
18 | 15 |
| |
19 | 16 |
| |
20 | 17 |
| |
21 | 18 |
| |
22 |
| - | |
23 |
| - | |
24 |
| - | |
25 |
| - | |
26 |
| - | |
27 |
| - | |
| 19 | + | |
28 | 20 |
| |
29 | 21 |
| |
30 | 22 |
| |
| |||
40 | 32 |
| |
41 | 33 |
| |
42 | 34 |
| |
43 |
| - | |
| 35 | + | |
44 | 36 |
| |
45 | 37 |
| |
46 | 38 |
| |
| |||
80 | 72 |
| |
81 | 73 |
| |
82 | 74 |
| |
83 |
| - | |
84 |
| - | |
85 |
| - | |
86 |
| - | |
87 |
| - | |
88 |
| - | |
89 |
| - | |
90 |
| - | |
91 |
| - | |
92 |
| - | |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 |
| - | |
97 |
| - | |
98 |
| - | |
99 |
| - | |
100 |
| - | |
| 75 | + | |
101 | 76 |
|
You can’t perform that action at this time.
0 commit comments