Skip to content

[BUG] cocoindex ls is too slow to use #412

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

Closed
lemorage opened this issue Apr 30, 2025 · 1 comment · Fixed by #414 or #415
Closed

[BUG] cocoindex ls is too slow to use #412

lemorage opened this issue Apr 30, 2025 · 1 comment · Fixed by #414 or #415
Assignees

Comments

@lemorage
Copy link
Contributor

Describe the bug
I met this issue while dealing with modifications to the show command. I put multiple flows in a file for testing purposes and used cocoindex ls to list them all. It took me about 40 seconds to finish this command, which was insane. It is hard to say this is definitely a bug, but I don't think that for a list command, it should take such a long time to return results to users.

Here is my measure result using the time command.

 cocoindex  time uv run main.py cocoindex ls
CodeEmbedding [+]
DocsToKG [+]
TextEmbedding [+]
GoogleDriveTextEmbedding [+]

Notes:
  [+]: Flows present in the current process, but missing setup.
uv run main.py cocoindex ls  3.63s user 1.86s system 12% cpu 42.977 total

To Reproduce
Steps to reproduce the behavior:

  1. Grab some different flows from examples, and put them all in main.py.
  2. Run python main.py cocoindex ls command, and you will wait for a very long time.

Expected behavior
ls command is just used for listing, it should be quite fast.

CocoIndex Version
latest

@badmonster0
Copy link
Member

@lemorage thanks for reporting the issue and submitting the fix!

(We started working on this in parallel. I also drafted a fix, with two improvements, and after merging my PR I just saw your PR, never mind. Now both PRs are merged)

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