-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
32 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3772d09
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that this will not change the case much, but still, I would do it this way:
In case for some reason you don't want to use TCollections, you can redo it at least on computeIfAbsent.
Fast example:
Unfortunately, the current version of TCollections does not have such a method.
Also, you are indefinitely holding compiled models, it is also a memory leak, since they are not being unloaded. You need to implement a system for tracking the use of the model and if it has not been used for a certain time, delete it. To do this, you will have to rework the current implementation.
Example delete:
3772d09
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right about the TLongObjectHashMap. It should be a little bit faster. And yes - holding models forever without tracking is not the best idea.
But now I'm very busy and don't have time to maintain the mod at all. I know about all such bugs and plan to fix them somehow in future.