Skip to content

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

@lemorage

Description

@lemorage

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions