Upload 10 files
Browse files
backend/src/services/screenshotService.js
CHANGED
|
@@ -73,9 +73,17 @@ class ScreenshotService {
|
|
| 73 |
'--no-first-run',
|
| 74 |
'--no-default-browser-check',
|
| 75 |
'--disable-default-apps',
|
| 76 |
-
'--disable-features=TranslateUI',
|
| 77 |
'--disable-ipc-flooding-protection',
|
| 78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
// 内存限制优化
|
| 80 |
'--js-flags=--max-old-space-size=512', // 降低JS内存使用
|
| 81 |
'--memory-pressure-off',
|
|
@@ -297,6 +305,24 @@ class ScreenshotService {
|
|
| 297 |
'--single-process',
|
| 298 |
'--disable-background-networking',
|
| 299 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 300 |
// 字体渲染优化
|
| 301 |
'--font-render-hinting=none'
|
| 302 |
],
|
|
|
|
| 73 |
'--no-first-run',
|
| 74 |
'--no-default-browser-check',
|
| 75 |
'--disable-default-apps',
|
| 76 |
+
'--disable-features=TranslateUI,VizDisplayCompositor',
|
| 77 |
'--disable-ipc-flooding-protection',
|
| 78 |
|
| 79 |
+
// 容器环境优化 - 禁用D-Bus和系统服务
|
| 80 |
+
'--disable-dbus',
|
| 81 |
+
'--disable-software-rasterizer',
|
| 82 |
+
'--disable-field-trial-config',
|
| 83 |
+
'--disable-translate',
|
| 84 |
+
'--disable-web-security',
|
| 85 |
+
'--allow-running-insecure-content',
|
| 86 |
+
|
| 87 |
// 内存限制优化
|
| 88 |
'--js-flags=--max-old-space-size=512', // 降低JS内存使用
|
| 89 |
'--memory-pressure-off',
|
|
|
|
| 305 |
'--single-process',
|
| 306 |
'--disable-background-networking',
|
| 307 |
|
| 308 |
+
// 容器环境优化 - 禁用D-Bus和系统服务
|
| 309 |
+
'--disable-dbus',
|
| 310 |
+
'--disable-features=VizDisplayCompositor',
|
| 311 |
+
'--disable-software-rasterizer',
|
| 312 |
+
'--disable-background-timer-throttling',
|
| 313 |
+
'--disable-backgrounding-occluded-windows',
|
| 314 |
+
'--disable-renderer-backgrounding',
|
| 315 |
+
'--disable-field-trial-config',
|
| 316 |
+
'--disable-ipc-flooding-protection',
|
| 317 |
+
'--no-first-run',
|
| 318 |
+
'--no-default-browser-check',
|
| 319 |
+
'--disable-default-apps',
|
| 320 |
+
'--disable-component-update',
|
| 321 |
+
'--disable-sync',
|
| 322 |
+
'--disable-translate',
|
| 323 |
+
'--disable-web-security',
|
| 324 |
+
'--allow-running-insecure-content',
|
| 325 |
+
|
| 326 |
// 字体渲染优化
|
| 327 |
'--font-render-hinting=none'
|
| 328 |
],
|