Skip to content

autodetect very slow #3536

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
josecastillagallardo opened this issue Nov 15, 2024 · 2 comments
Closed

autodetect very slow #3536

josecastillagallardo opened this issue Nov 15, 2024 · 2 comments

Comments

@josecastillagallardo
Copy link

Hi, the autodetect process is slow, Are there any way to improve the speed?

@ktbyers
Copy link
Owner

ktbyers commented Nov 15, 2024

@josecastillagallardo Can you explain what your workflow is and what kind of slowness you are seeing?

Note, autodetect generally should be a one-off process (you do it once and then permanently save the device_type into some information store). You should overlay threading onto it to do autodetect for a bunch of devices.

@evilmonkey19
Copy link
Contributor

evilmonkey19 commented Jan 26, 2025

Technically, you could speed up the process if you wait less here. This is not recommended at all as It could break getting wrong values on slow systems, etc.

Nevertheless, that being said, I agree with @ktbyers that it should be a one-off process, and then the value should be stored in a data store. This is not a process that you should run often. I have seen colleagues trying to use this value to detect thousands of devices on a process that runs once a day. Advice: Store the values on a YAML file or something similar, then it will speed up significantly. Also, maintaining a YAML file is cleaner and easier if you plan to run it on multiple devices (think of Nornir). If you have something better like SoT, then even better :).

@ktbyers ktbyers closed this as completed Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants