hyperf / watcher

[READ ONLY]
18 stars 11 forks source link

项目使用很慢 #20

Closed taobali32 closed 2 years ago

taobali32 commented 2 years ago

版本:hyperf/watcher:^2.2

问题 刚开始是很快的, 现在改动代码重启需要10s+, 我的composer配置


{
    "name": "hyperf/hyperf-skeleton",
    "type": "project",
    "keywords": [
        "php",
        "swoole",
        "framework",
        "hyperf",
        "microservice",
        "middleware"
    ],
    "description": "A coroutine framework that focuses on hyperspeed and flexible, specifically use for build microservices and middlewares.",
    "license": "Apache-2.0",
    "require": {
        "php": ">=7.3",
        "ext-curl": "*",
        "ext-json": "*",
        "ext-zlib": "*",
        "endroid/qr-code": "^4.4",
        "hyperf-ext/auth": "^2.2",
        "hyperf-ext/jwt": "^2.2",
        "hyperf/async-queue": "^2.2",
        "hyperf/cache": "~2.2.0",
        "hyperf/command": "~2.2.0",
        "hyperf/config": "~2.2.0",
        "hyperf/constants": "~2.2.0",
        "hyperf/crontab": "^2.2",
        "hyperf/database": "~2.2.0",
        "hyperf/db-connection": "~2.2.0",
        "hyperf/elasticsearch": "^2.2",
        "hyperf/filesystem": "^2.2",
        "hyperf/framework": "~2.2.0",
        "hyperf/guzzle": "~2.2.0",
        "hyperf/http-server": "~2.2.0",
        "hyperf/logger": "^2.2",
        "hyperf/memory": "~2.2.0",
        "hyperf/model-cache": "~2.2.0",
        "hyperf/process": "~2.2.0",
        "hyperf/redis": "~2.2.0",
        "hyperf/resource": "^2.2",
        "hyperf/signal": "^2.2",
        "hyperf/task": "^2.2",
        "hyperf/tracer": "^2.2",
        "hyperf/validation": "^2.2",
        "jtar/poster": "master",
        "overtrue/flysystem-cos": "^4.0",
        "qcloud_sts/qcloud-sts-sdk": "^3.0",
        "yansongda/hyperf-pay": "^1.0"
    },
    "require-dev": {
        "friendsofphp/php-cs-fixer": "^3.0",
        "hyperf/devtool": "~2.2.0",
        "hyperf/ide-helper": "2.2.*",
        "hyperf/testing": "~2.2.0",
        "hyperf/watcher": "^2.2",
        "mockery/mockery": "^1.0",
        "phpstan/phpstan": "^0.12",
        "swoole/ide-helper": "^4.5"
    },
    "suggest": {
        "ext-openssl": "Required to use HTTPS.",
        "ext-pdo": "Required to use MySQL Client.",
        "ext-pdo_mysql": "Required to use MySQL Client.",
        "ext-redis": "Required to use Redis Client."
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/"
        },
        "files": [
            "app/Utils/helper.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "HyperfTest\\": "./test/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "config": {
        "optimize-autoloader": true,
        "sort-packages": true
    },
    "extra": [],
    "scripts": {
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-autoload-dump": [
            "rm -rf runtime/container"
        ],
        "test": "co-phpunit --prepend test/bootstrap.php -c phpunit.xml --colors=always",
        "cs-fix": "php-cs-fixer fix $1",
        "analyse": "phpstan analyse --memory-limit 300M -l 0 -c phpstan.neon ./app ./config",
        "start": [
            "Composer\\Config::disableProcessTimeout",
            "php ./bin/hyperf.php start"
        ]
    }
}

# 测试
新起一个项目就是很快的,期待可以优化下这个组件
limingxinleo commented 2 years ago

你应该是用了signal组件导致的。。。

taobali32 commented 2 years ago

是的。