View Single Post
  #3   Spotlight this post!  
Unread 17-02-2015, 23:49
MatthewC529 MatthewC529 is offline
Lcom/mattc/halp;
AKA: Matthew
FRC #1554 (Oceanside Sailors)
Team Role: Mentor
 
Join Date: Feb 2014
Rookie Year: 2013
Location: New York
Posts: 39
MatthewC529 is on a distinguished road
Re: Profiling a Robot

Quote:
Originally Posted by GeeTwo View Post
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?
__________________
Team 1554 -- Oceanside Sailors
  • 2013-2014 - Lead/Sole Programmer
  • 2014-2015 - Lead Programmer, President
  • 2015-? - Team 1554 Mentor
Independent Public Projects

Developer at Legend Zero LLC.
Java/C++ Programmer
Reply With Quote