-
Notifications
You must be signed in to change notification settings - Fork 4
Feature improve threading #20
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
base: dev
Are you sure you want to change the base?
Conversation
…N macro with std::min in markerCreator.cpp
|
The code now with the threaded feature may produce a NFT file 3 time faster, but require a bit of memory. I will do some tests for this. |
|
I should add a print in the output to display the number of threads involved when used the |
|
i tested with gcloud and with 16 core it is at least 4 times faster !! Maybe in some machine is better to specify how many threads to use, i will add also this option. |
…nt handling in markerCreator
…th threaded option
|
I need to do some tests with the generated nft markers (pinball.jpg) with the threaded option. I tested with the markers generated in on a remote host with jsartoolkitNFT, they can be loaded without any issues but when the app try to detect with a aebcam stream they are unable to detect (they are tdetected and suddenly lost). I noticed that .fset in respect of old one are 1 kb only instead of 12 kb; even .iset and .fset3 looks different, but this could be caused because the initial image was different. I would generate with and without --threaded option and compare both NFT markers. |
- Enhanced the threading implementation by ensuring proper locking mechanisms around critical sections. - Added error handling for feature map generation, logging an error message and exiting if the feature map is NULL. - Simplified the calculation of mindpi and maxdpi for feature sets, ensuring more robust handling of scale values. - Cleaned up code structure for better readability and maintainability.
|
I tested the new NFT markers created with the threaded version of the app, they seems to works as expected, but i will make more text in the next days. Just one note about the creation, with 8 threads my laptop take around 60 seconds to create the NFT marker instead the not threaded version takes 210 seconds... |
This pull request includes several updates across multiple files to improve performance, update dependencies, and enhance functionality. The most significant changes include updating the Node.js version in the
README.md, adding threading support for feature map generation in themarkerCreatorandthreaded_featureMapfiles, and improving error handling and memory management in theNFTMarkerCreator.js.Node.js Version Update:
README.mdfile.Performance Improvements:
emscripten/markerCreator.cppand introduced a newthreaded_featureMap.cppfile for threaded feature mapping. [1] [2]fopenandfwritewithstd::ofstreamfor file operations inemscripten/markerCompress.cpp.Codebase Simplification:
#definemacros withconstexprfor constants inemscripten/markerCreator.cpp.emscripten/markerCreator.cpp. [1] [2]Error Handling and Memory Management:
Module.onRuntimeInitializedfunction insrc/NFTMarkerCreator.js.src/NFTMarkerCreator.js.Dependency Updates:
prettierdependency to version 3.5.3 inpackage.json.These changes collectively enhance the project's performance, maintainability, and robustness.