Skip to content

The first-time model compilation takes a long time #30053

Answered by ilya-lavrenov
max-my asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @max-my

You are using ov::cache_dir(cachePath) which enables OpenVINO models caching feature, which means on first application run you will have to compile model from scratch and store results to cachePath on a disk, while the second and next application runs leverage a compiled blob from cachePath and application starts faster.

So, it's expected I would say. Could you please try to remove ov::cache_dir(cachePath) option and confirm that in all cases application runs slower?

More details about the feature is here https://docs.openvino.ai/2025/openvino-workflow/running-inference/optimize-inference/optimizing-latency/model-caching-overview.html

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@max-my
Comment options

@ilya-lavrenov
Comment options

Answer selected by ilya-lavrenov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants