Quote:
Originally Posted by GeeTwo
Wow - running out of resources in just a few minutes; usually not a problem. If you don't find a proper resource monitoring tool, I'd suggest adding logging (printing to dashboard or equivalent) of every constructor - because that's where the resources are taken. I'm already concerned about how many resources many recent java programs seem to take and discard, when they could very easily reuse them. It sounds like you have such a condition, coupled with remnant references to the no-longer-needed objects declared earlier.
|
I am very aware, the library is large mostly because they are based on sound principles of pre-existing libraries such as Google Guava, LibGDX's Primitive Collections, JavaFX Property/Binding Framework and so on. As well as, of course, Robotics specific features.
The memory we use is approximately 20 MB at a time. We tracked the performance down to nothing in the library itself (which consists of 100+ files programmed by one person, too much to search without a profiling tool), but rather constantly updating and retrieving NetworkTable values as part of the IterativeRobot Loop.
I am not sure why, but I am guessing that is not the advised way of putting and getting values from a Network Table. Likely we will have to do it on an as needed base, a bit more complicated but not much.
Any suggestions for how to properly send and receive Network Table data?