-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Long loading time Loader.load(org.bytedeco.opencv.opencv_java.class); #1638
Comments
This has been fixed with JavaCPP 1.5.5. Please try again with JavaCV 1.5.5. |
Thank you for quick answer ! After updgrading to the lastest version, I have save around 15 seconds. Do you think I can do better or it is the best ? |
Please set the "org.bytedeco.javacpp.logger.debug" system property to "true", and look at the messages displayed on the console. We should be able to tell that way which DLLs are taking so long to load. |
Sorry for the delay... I have run the application with the debug flag on and as you say I see all the dll been loaded but none of them take much time ! What seem to be long is the fact that a lot of dll are loaded ! I have excluded some jar from the javacv maven dependency to reduce loading time but no luck ... I imagine it's the best i can do ! |
What do you mean by "a lot"? Could you attach the whole log here? |
This the console log output. You will see what I mean by a lot ! |
Thanks for testing! The same classes and DLLs get loaded for me as well, and on my installation of Windows 10, calling |
Duplicate of bytedeco/javacpp#452 |
I've done some further optimizations in commit bytedeco/javacpp@e8b5734 that should pretty much fix any regression in loading time on Windows. Please give it a try with the snapshots: http://bytedeco.org/builds/ |
I've just done some tests with your snapshot ! The starting time has past from 20 seconds to only 4 seconds ! Thank you ! |
4 seconds is still a lot of time though. I wonder what's going on there. Would you have any ideas @HannesWell? |
Not immediately but I can consider this case when looking for further optimizations of the Loader. The more cases I have and the long they the better I can find more hot spots in the code. What was the exact use case? Did you only call the code mentioned in the title? @saudet can you tell me the largest preset to load? Alternatively I could just load multiple libraries. |
I think the one that takes the most time is SciPy, see bytedeco/javacpp#512 (comment). The issue with Python libraries is that they have a lot of small files that we have to extract and NTFS is not particularly optimized for this use case. |
When I load the library on startup it take about 30 seconds to finish the loading,,, Is there a way to remove some library to reduce the loading time or something else?
The text was updated successfully, but these errors were encountered: