[engine] [adapters] [common] 增加 WebSocket 和子包的开关

This commit is contained in:
SmallMain
2024-11-22 16:54:43 +08:00
parent d6fb7f841b
commit 5a03a9dc86
11 changed files with 66 additions and 6 deletions

View File

@@ -64,6 +64,10 @@ module.exports = {
'thread_audio_system_desc': 'When enabled, time-consuming audio operations will be executed in a separate thread, reducing stuttering caused by audio API calls.',
'thread_audio_sync': 'Property Sync Interval (milliseconds)',
'thread_audio_sync_desc': 'How often the properties of audio instances (playback progress, total duration, etc.) are synchronized from the worker thread to the main thread. Too frequent updates may impact performance.',
'thread_ws': 'Multi-threaded WebSocket',
'thread_ws_desc': 'After enabling, the WebSocket will be executed in a separate thread, and custom data encoding/decoding is allowed. Due to the time-consuming data round-trip, please test in practice to see if there is an improvement in performance.',
'thread_subpackage': 'Set Mini-Game subpackage',
'thread_subpackage_desc': 'After enabling, the workers directory will be set as a mini-game subpackage, which will reduce the size of the main package but may affect startup performance. Please enable according to the situation.',
'thread_scheduler': 'Thread Communication Scheduler',
'thread_scheduler_desc': 'When enabled, multiple data communications will be bundled and sent together, which may reduce performance overhead caused by frequent communications.',
'thread_compile_custom_thread_menu': 'Recompile the multithreading extension',

View File

@@ -64,6 +64,10 @@ module.exports = {
'thread_audio_system_desc': '启用后将音频耗时操作移至线程中执行,减少由音频 API 调用导致的卡顿。',
'thread_audio_sync': '属性同步间隔(毫秒)',
'thread_audio_sync_desc': '间隔多久从 Worker 线程将音频实例的属性(播放进度、总时长等)同步到主线程,太频繁可能会影响性能。',
'thread_ws': '多线程驱动 WebSocket',
'thread_ws_desc': '启用后将 WebSocket 移至线程中执行,并且允许自定义数据编解码,由于存在数据往返的耗时,请实际测试对性能是否有提升。',
'thread_subpackage': '设为小游戏子包',
'thread_subpackage_desc': '启用后将 workers 目录设为小游戏子包,这会减少主包的大小,但可能影响启动性能,请视情况启用。',
'thread_scheduler': '线程通信调度器',
'thread_scheduler_desc': '启用后将多次数据通信打包发送,这可能会减少因通信次数带来的性能消耗。',
'thread_compile_custom_thread_menu': '重新编译多线程扩展',