Closed Rwing closed 7 years ago
还好吧,最多几秒,你起来会监听文件变化。
会不会是静态资源太多, watcher 那里?
另,@popomore loader 加载的文件数要不要打印下?
发自我的 iPhone
在 2017年5月9日,18:32,Haoliang Gao notifications@github.com 写道:
还好吧,最多几秒,你起来会监听文件变化。
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
@atian25 这个可以在这里回复下 https://github.com/eggjs/egg/issues/688
@Rwing 慢是多慢~
hello 各位,突然觉得这个问题也有点侨情,其实时间也不是很慢,也就10秒左右,再加上 typescript 的 tsc 和 vscode 的 attach 个人感觉有点慢而已。不行关闭了吧
10s... 有点长,你做了什么事么?
本地起一个最简单的项目看看是多久,我有点怀疑是不是静态资源太多的问题,你的目录结构是怎么样的
没有静态资源,刚刚开始的纯 api 项目……日志如下 机器配置 Mac mini (Late 2014) 2.6 GHz Intel Core i5 8 GB 1600 MHz DDR3
2017-05-10 13:35:17,105 INFO 40836 [master] =================== egg start ===================== 2017-05-10 13:35:17,107 INFO 40836 [master] egg version 1.2.1 2017-05-10 13:35:17,108 INFO 40836 [master] start with options: {"framework":"/Users/Rwing/Project//node_modules/egg","baseDir":"/Users/Rwing/Project/","port":7001,"workers":1,"plugins":null,"https":false,"key":"","cert":""} 2017-05-10 13:35:17,109 INFO 40836 [master] start with env: isProduction: false, isDebug: true, EGG_SERVER_ENV: undefined, NODE_ENV: development 2017-05-10 13:35:17,127 INFO 40836 [master] Agent Worker:40837 start with ["{\"framework\":\"/Users/Rwing/Project//node_modules/egg\",\"baseDir\":\"/Users/Rwing/Project/\",\"port\":7001,\"workers\":1,\"plugins\":null,\"https\":false,\"key\":\"\",\"cert\":\"\",\"clusterPort\":54735}"] Debugger listening on 127.0.0.1:5856 2017-05-10 13:35:17,965 WARN 40837 [egg:loader] pkg.eggPlugin is missing in /Users/Rwing/Project//node_modules/egg-typeorm/package.json 2017-05-10 13:35:18,349 INFO 40837 [egg:logger] init all loggers with options: {"dir":"/Users/Rwing/Project//logs/","encoding":"utf8","env":"local","level":"INFO","consoleLevel":"INFO","outputJSON":false,"buffer":true,"appLogName":"-web.log","coreLogName":"egg-web.log","agentLogName":"egg-agent.log","errorLogName":"common-error.log","coreLogger":{},"type":"agent"} 2017-05-10 13:35:18,464 INFO 40837 [ClusterClient:Watcher] subscribe ["/Users/Rwing/Project//app","/Users/Rwing/Project//config","/Users/Rwing/Project//mocks","/Users/Rwing/Project//mocks_proxy"] 2017-05-10 13:35:19,086 INFO 40837 [ClusterClient:Watcher] has seized port 54735, and serves as leader client. 2017-05-10 13:35:19,100 INFO 40837 [egg-watcher:agent] watcher start success 2017-05-10 13:35:19,132 INFO 40836 [master] Agent Worker started (2009ms) 2017-05-10 13:35:19,158 INFO 40836 [master] App Worker#1:40838 start, state: none, current workers: ["1"] Debugger listening on 127.0.0.1:5859 2017-05-10 13:35:19,542 WARN 40838 [egg:loader] pkg.eggPlugin is missing in /Users/Rwing/Project//node_modules/egg-typeorm/package.json 2017-05-10 13:35:21,731 INFO 40838 [egg:logger] init all loggers with options: {"dir":"/Users/Rwing/Project//logs/","encoding":"utf8","env":"local","level":"INFO","consoleLevel":"INFO","outputJSON":false,"buffer":true,"appLogName":"-web.log","coreLogName":"egg-web.log","agentLogName":"egg-agent.log","errorLogName":"common-error.log","coreLogger":{},"type":"application"} 2017-05-10 13:35:22,091 INFO 40838 [egg-schedule]: register schedule egg-schedule:/Users/Rwing/Project//node_modules/egg-logrotator/app/schedule/clean_log.js 2017-05-10 13:35:22,091 INFO 40838 [egg-schedule]: register schedule egg-schedule:/Users/Rwing/Project//node_modules/egg-logrotator/app/schedule/rotate_by_file.js 2017-05-10 13:35:22,169 INFO 40838 [egg-development-proxyworker] client worker ready to connect proxyworker. 2017-05-10 13:35:22,174 INFO 40837 [egg-development-proxyworker] debugger attached 2017-05-10 13:35:22,175 INFO 40837 [egg-development-proxyworker] debugger debugPort is 5859 and proxyPort is 10086 2017-05-10 13:35:22,432 INFO 40839 [egg-development-proxyworker] debugger listen at 10086 2017-05-10 13:35:22,610 INFO 40839 [egg-development-proxyworker] receive new socket connection from ::ffff:127.0.0.1:54793 2017-05-10 13:35:22,611 INFO 40839 [egg-development-proxyworker] create client connection socket ing... 2017-05-10 13:35:22,614 INFO 40839 [egg-development-proxyworker] client socket started. 2017-05-10 13:35:24,346 INFO 40838 [egg-static] starting static serve /public/ -> /Users/Rwing/Project/***/app/public 2017-05-10 13:35:24,384 INFO 40838 [egg-security] use csrf middleware 2017-05-10 13:35:24,392 INFO 40838 [egg-security] use methodnoallow middleware 2017-05-10 13:35:24,403 INFO 40838 [egg-security] use noopen middleware 2017-05-10 13:35:24,426 INFO 40838 [egg-security] use nosniff middleware 2017-05-10 13:35:24,436 INFO 40838 [egg-security] use xssProtection middleware 2017-05-10 13:35:24,439 INFO 40838 [egg-security] use xframe middleware 2017-05-10 13:35:24,439 INFO 40838 [egg-security] compose 6 middlewares into one security middleware 2017-05-10 13:35:24,495 INFO 40838 [egg-typeorm] connecting postgres@192.168.86.100:5432/postgres 2017-05-10 13:35:25,245 WARN 40836 [master] App Worker#1:40838 started at 7001, remain 0 (6109ms) 2017-05-10 13:35:25,246 INFO 40836 [master] egg started on http://127.0.0.1:7001 (8135ms) 2017-05-10 13:35:25,251 INFO 40838 [ClusterClient:Watcher] gives up seizing port 54735, and serves as follower client. 2017-05-10 13:35:25,258 INFO 40838 [egg-watcher:app] watcher start success 2017-05-10 13:35:25,278 INFO 40838 [egg-typeorm] instance[0] status OK, typeorm result: 1 2017-05-10 13:35:25,467 INFO 40837 [Leader:Watcher] socket connected, port: 54805 2017-05-10 13:35:25,469 INFO 40838 [Follower:Watcher] register to channel: Watcher success
不是 SSD 硬盘?
不是.... 😢
如题,因为对 egg 不是很熟悉,所以要不断的启动调试重启之类的,但是 egg 每次启动都很慢,用 vscode 附加进程 debug 就更慢了。。。。所以想问问有啥解决办法没