Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample App slow, using a lot of RAM and CPU #24

Closed
Vollkorn01 opened this issue Oct 12, 2021 · 2 comments
Closed

Sample App slow, using a lot of RAM and CPU #24

Vollkorn01 opened this issue Oct 12, 2021 · 2 comments

Comments

@Vollkorn01
Copy link

Vollkorn01 commented Oct 12, 2021

Describe the problem

After having built the sample app from https://github.com/elbelel/CometChat-Vue-Chat-App/issues which uses this uikit, interactions like sending a message have a considerable lag. This is especially noticeable in group chats with dozens of messages, where it sometimes takes up to 5 seconds for a message to appear on screen after sending it.
Additionally, the app uses a lot of ram, when sending multiple messages in succession (almost reaching 1 gb) and having CPU spikes every time a message is sent.

Here's a video (using chrome performance monitor):

comet.vue.slow.mov

What was the expected behavior?

The sample app should be responsive, RAM usage should stay low and CPU spikes should be lower.

Reproduction

Step 1: Follow the instructions on the cometchat vue setup tutorial: https://www.cometchat.com/tutorials/create-a-chat-app-with-vue
Step 2: Run the app on your machine, select a group and send multiple messages in succession. The app will get slower and slower.

Environment

Here's my package.json:

{
    "name": "chat",
    "version": "0.1.0",
    "private": true,
    "scripts": {
        "serve": "vue-cli-service serve",
        "build": "vue-cli-service build",
        "lint": "vue-cli-service lint"
    },
    "dependencies": {
        "core-js": "^3.6.5",
        "vue": "^2.6.11",
        "dateformat": "^4.5.1",
        "emoji-mart-vue-fast": "^10.0.1",
        "twemoji": "^13.0.2",
        "vue-router": "^3.5.1",
        "@cometchat-pro/chat": "^3.0.0-beta1"
    },
    "devDependencies": {
        "@vue/cli-plugin-babel": "~4.5.0",
        "@vue/cli-plugin-eslint": "~4.5.0",
        "@vue/cli-service": "~4.5.0",
        "babel-eslint": "^10.1.0",
        "eslint": "^6.7.2",
        "eslint-plugin-vue": "^6.2.2",
        "vue-template-compiler": "^2.6.11"
    },
    "eslintConfig": {
        "root": true,
        "env": {
            "node": true
        },
        "extends": [
            "plugin:vue/essential",
            "eslint:recommended"
        ],
        "parserOptions": {
            "parser": "babel-eslint"
        },
        "rules": {}
    },
    "browserslist": [
        "> 1%",
        "last 2 versions",
        "not dead"
    ]
}
@Vollkorn01 Vollkorn01 changed the title Sample App slow, using lot of RAM and CPU Sample App slow, using a lot of RAM and CPU Oct 12, 2021
@prakash-cometchat
Copy link
Contributor

We have released a newer version of Vue UI Kit.
v2: v2.4.1-beta1-1 https://github.com/cometchat-pro/cometchat-pro-vue-ui-kit
v3: v3.0.2-beta1-1 https://github.com/cometchat-pro/cometchat-pro-vue-ui-kit/tree/v2

Please update to the latest UI kit, this issue has been fixed.

Best Regards

@Vollkorn01
Copy link
Author

Thanks a lot for fixing the performance issue. Seems to be solved. Still uses quite some RAM, but I will close this issue for now.
Thanks for the quick response and stellar support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants