Second try do not work too. Cordialement,
Olivier Cruilles > Le 2 mai 2015 à 17:38, Olivier Cruilles <olivier.cruil...@yahoo.fr> a écrit : > > Ok, I will investigate and I back to you. > > Thank you > > Cordialement, > > Olivier Cruilles > > >> Le 2 mai 2015 à 17:11, Benoît Minisini <gam...@users.sourceforge.net> a >> écrit : >> >> Le 01/05/2015 20:05, Olivier Cruilles a écrit : >>> Hi Benoit, Is there a way to monitor usage of memory of objects >>> (Class, Collection, etc...) in Gambas please ? May be you have >>> already developed something like time execution profiler already >>> existing in Gambas but for memory usage ? My problem is I use an >>> Editor object in a project because it is so great to display text >>> with numbered lines and other possibilities that it offer but after >>> inserted 12000 lines just by Editor1.Text &= new_text_receive, the >>> memory usage of my program jump from 65 MB of memory resident to >>> around 1GB. So, with a memory profiler in Gambas it will easier to >>> find where I need to change my code to optimize space memory. Do you >>> think something can be made in this way please ? Thank you Olivier >>> >> >> Not automatically, but you can periodically print the number of each >> object of each class. >> >> I don't see why the Editor would make the memory consumption jump suddenly. >> >> But doing "Editor1.Text &= new_text" is very stupid, because it extracts >> the entire text from the Editor to a new string, creates another new >> string by concatenating "new_text", and the result is sent back to the >> Editor, and will be parsed so that each line is recreated. The heap >> becomes fragmented, and so the heap that is not used anymore cannot be >> actually freed. >> >> Use the Insert() method instead. If it makes the memory consumption >> going down, you found the guilty code. >> >> Regards, >> >> -- >> Benoît Minisini > ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user