Re: URL of patch for HashStore
I think alot of the memory is used by plugins that are not even being used bc all plugins are loaded at startup. We would see a massive reduction in the memory footprint if we demand load our plugins. elrod > Better Quesion: Can anything else be done about the RAM use? Or is it > all a bloated std c++ library? ___ [EMAIL PROTECTED] http://www.freeamp.org/mailman/listinfo/freeamp-dev
Re: URL of patch for HashStore
On Thu, Sep 28, 2000 at 04:04:54PM -0700, Mark B. Elrod wrote: > so i did some reading up on stl strings and it appears they are copy on write. I learn something new every day...usually 7 days after it would have been most useful to learn it. > i do > not know if this is only for instances where you do this: > > string foo, bar; > > foo = "hello"; > bar = foo; > > and not for instances like this: > > string foo, bar; > > foo = hello; > bar = hello; > > the results that isaac posted seem to indicate that the second case is copy on write > in which case the char store stuff won't save us any memory h need more > research to confirm/deny this theory. > I have too little time for the next few days to find that. > elrod > Except for the case where the string is empty, in which case I allocate 1 byte which all the empty strings point to ( + 4 bytes for each char * in the program of course). I bet C.O.W. string does not compress duplicates: string a,b; char * x,y; x=strdup("Hello"); y=strdup(x); a=x; b=y; free(x) free(y); Since to detect this, b would have to search the actual contents of a. Initializing a string from a char * has to make a copy. So...damn. Perhaps HashStore should have used string internally. (Like MetaData did). Now the guid is in the HashStore as char* so the guid string key in m_guidTable must make a full copy of it, where before it coould copy on write. So if HashTable is used, I *have* to fix m_guidTable to use char* as its key as well. Eliminating duplicate url paths by splitting into path and filename is independent of this. Note : m_guidTable is only used 18 lines of code in musiccatalog.cpp and nowhere else, so it is much easier to change than MetaData was. But if you split the filename into path&filename then PlaylistItem would need fixing internally. I suggest either a) Reverting my patch and forgetting the whole mess. b) Keeping HashStore with m_guidTable as multimap instead of multimap -- C.O.W. strins does not fix Gtk widgets. If the current CList and CTree are duplicating the passed pointers, then for a full playlist there are 3 copies of the strings. Too bad the widgets are not using the std::string class. --- Better Quesion: Can anything else be done about the RAM use? Or is it all a bloated std c++ library? I am not up to speed on loadable modules as they are used here. Do they contain redundant copies of some freeamp .o files? What is a good memory profiler to find out what object files are using more memory (for code or data or whatever it can measure) at run time? - Anyway, I have no time to code again on this until Saturday. If we toss out HashStore I can go back to working on GUI improvements, and thinking about a search interface. -- Chris. ___ [EMAIL PROTECTED] http://www.freeamp.org/mailman/listinfo/freeamp-dev
Re: URL of patch for HashStore
so i did some reading up on stl strings and it appears they are copy on write. i do not know if this is only for instances where you do this: string foo, bar; foo = "hello"; bar = foo; and not for instances like this: string foo, bar; foo = hello; bar = hello; the results that isaac posted seem to indicate that the second case is copy on write in which case the char store stuff won't save us any memory h need more research to confirm/deny this theory. elrod Chris Kuklewicz wrote: > On Thu, Sep 28, 2000 at 04:42:07PM -0400, Isaac Richards wrote: > > Okay, I've checked this stuff out.. Few helpful tips =) > > > > - When generating a patch against CVS, please remember to update your local > > copy. > > Guilty. Very guilty. > I knowingly and cowardly and deliberately violated best practice. > I am pretending that I am on a branch, since my changes are so scattered. > I will bite that bullet in future cases. > > > - Remember to remove your editors temporary files.. > > I tried with commands like: > rm `find -name '*~' -o -name '.#*'` > > > - look at your patch before posting it =) > > Guilty as charged. I only glanced at it. > > > > > ie., freeamp-hashstore-1.cvs.patch.gz is 525k. If you remove all the junk in > > the patch, it goes down to 35k. > > Oooh. > > > > > On to comments 'bout what it's doing. > > > > - Shouldn't MetaData::SetCharStore be called before the music catalog is loaded? > > I call that in unix main bootstrap.cpp and in the player ctor. > That could be fixed. > > > - Memory usage before and after using the patch is identical. > > > > Tested by loading freeamp, adding all tracks in MyMusic to the current > > playlist, and playing it. > > > > CVS: Size: 22624 RSS: 18832 > > CVS+patch: Size: 22608 RSS: 18808 > > > > Damn. What compile flags were use? Not that it really matters > Since my coplies take forever I have not really tested the memory usage. > > Are duplicate STL strings copy on write? Hmmm... > > As for the MVC widgets in gtk...we could just wait for the next version: > > http://mail.gnome.org/archives/gtk-app-devel-list/2000-September/msg00084.html > > From: Havoc Pennington > To: bl tod dk > Cc: gtk-app-devel-list gnome org > Subject: Re: New version of GTK+ > Date: 08 Sep 2000 22:20:28 -0400 > > Bo Lorentsen <[EMAIL PROTECTED]> writes: > > Havoc Pennington wrote: > > > > > The new text/tree widgets are totally incompatible with the old ones. > > > (But again, the old ones remain in GTK+, so you don't have to port > > > until you want to.) The text widget code is in CVS in mostly final > > > form, and there's a testtext.c to look at. The tree widget is in the > > > 'gtree' module in CVS and is still very much in flux. > > > > Does this mean that then next version will have real MVC layout, to make > > it possible to display lager data lists (alias database's) ? > > > > Yes, this feature was the primary motivation for the new widget. (Or > at least one of the most important motivations.) > > Havoc > > ___ > [EMAIL PROTECTED] > http://www.freeamp.org/mailman/listinfo/freeamp-dev ___ [EMAIL PROTECTED] http://www.freeamp.org/mailman/listinfo/freeamp-dev
Re: URL of patch for HashStore
On 28-Sep-2000 Chris Kuklewicz wrote: > I call that in unix main bootstrap.cpp and in the player ctor. > That could be fixed. Wasn't in the CVS patch, at least.. > Damn. What compile flags were use? Not that it really matters > Since my coplies take forever I have not really tested the memory usage. Normal -O2 -g, cept for the -O0 files. > Are duplicate STL strings copy on write? Hmmm... > > As for the MVC widgets in gtk...we could just wait for the next version: Ya, I'm going to have to rewrite most of the UIs when gtk+-2.0 comes out anyways... Isaac ___ [EMAIL PROTECTED] http://www.freeamp.org/mailman/listinfo/freeamp-dev
Re: URL of patch for HashStore
On Thu, Sep 28, 2000 at 04:42:07PM -0400, Isaac Richards wrote: > Okay, I've checked this stuff out.. Few helpful tips =) > > - When generating a patch against CVS, please remember to update your local > copy. Guilty. Very guilty. I knowingly and cowardly and deliberately violated best practice. I am pretending that I am on a branch, since my changes are so scattered. I will bite that bullet in future cases. > - Remember to remove your editors temporary files.. I tried with commands like: rm `find -name '*~' -o -name '.#*'` > - look at your patch before posting it =) Guilty as charged. I only glanced at it. > > ie., freeamp-hashstore-1.cvs.patch.gz is 525k. If you remove all the junk in > the patch, it goes down to 35k. Oooh. > > On to comments 'bout what it's doing. > > - Shouldn't MetaData::SetCharStore be called before the music catalog is loaded? I call that in unix main bootstrap.cpp and in the player ctor. That could be fixed. > - Memory usage before and after using the patch is identical. > > Tested by loading freeamp, adding all tracks in MyMusic to the current > playlist, and playing it. > > CVS: Size: 22624 RSS: 18832 > CVS+patch: Size: 22608 RSS: 18808 > Damn. What compile flags were use? Not that it really matters Since my coplies take forever I have not really tested the memory usage. Are duplicate STL strings copy on write? Hmmm... As for the MVC widgets in gtk...we could just wait for the next version: http://mail.gnome.org/archives/gtk-app-devel-list/2000-September/msg00084.html From: Havoc Pennington To: bl tod dk Cc: gtk-app-devel-list gnome org Subject: Re: New version of GTK+ Date: 08 Sep 2000 22:20:28 -0400 Bo Lorentsen <[EMAIL PROTECTED]> writes: > Havoc Pennington wrote: > > > The new text/tree widgets are totally incompatible with the old ones. > > (But again, the old ones remain in GTK+, so you don't have to port > > until you want to.) The text widget code is in CVS in mostly final > > form, and there's a testtext.c to look at. The tree widget is in the > > 'gtree' module in CVS and is still very much in flux. > > Does this mean that then next version will have real MVC layout, to make > it possible to display lager data lists (alias database's) ? > Yes, this feature was the primary motivation for the new widget. (Or at least one of the most important motivations.) Havoc ___ [EMAIL PROTECTED] http://www.freeamp.org/mailman/listinfo/freeamp-dev
Re: URL of patch for HashStore
hey issac.. could you check his stuff in to a branch so i can check it out? i am having trouble with patch on win32... elrod Isaac Richards wrote: > Okay, I've checked this stuff out.. Few helpful tips =) > > - When generating a patch against CVS, please remember to update your local > copy. > - Remember to remove your editors temporary files.. > - look at your patch before posting it =) > > ie., freeamp-hashstore-1.cvs.patch.gz is 525k. If you remove all the junk in > the patch, it goes down to 35k. > > On to comments 'bout what it's doing. > > - Shouldn't MetaData::SetCharStore be called before the music catalog is loaded? > - Memory usage before and after using the patch is identical. > > Tested by loading freeamp, adding all tracks in MyMusic to the current > playlist, and playing it. > > CVS: Size: 22624 RSS: 18832 > CVS+patch: Size: 22608 RSS: 18808 > > Isaac > > On 28-Sep-2000 Chris Kuklewicz wrote: > > The patches can be downloaded from my MIT AFS account : > > http://web.mit.edu/chrisk/www/ > > http://web.mit.edu/chrisk/www/freeamp-hashstore-1.cvs.patch.gz > > http://web.mit.edu/chrisk/www/freeamp-hashstore-1.beta9.patch.gz > > > > Or my full tarball (from my personal machine, more space) : > > http://kuklewicz.mit.edu/ > > http://kuklewicz.mit.edu/freeamp-hashstore-1.tar.gz > > > > freeamp-hashstore-1.cvs.patch.gz is against latest CVS at 8:20PM EST > > on Sept. 27,2000 (made with diff -uPr -x CVS freeamp freeamp-hashstore > >| gzip > /home/shared/mit/freeamp-hashstore-1.cvs.patch.gz) > > > > freeamp-hashstore-1.beta9.patch.gz is against 2.1 beta 9 tar.gz > > > > If people need a full > > ___ > > [EMAIL PROTECTED] > > http://www.freeamp.org/mailman/listinfo/freeamp-dev > ___ > [EMAIL PROTECTED] > http://www.freeamp.org/mailman/listinfo/freeamp-dev ___ [EMAIL PROTECTED] http://www.freeamp.org/mailman/listinfo/freeamp-dev
RE: URL of patch for HashStore
Okay, I've checked this stuff out.. Few helpful tips =) - When generating a patch against CVS, please remember to update your local copy. - Remember to remove your editors temporary files.. - look at your patch before posting it =) ie., freeamp-hashstore-1.cvs.patch.gz is 525k. If you remove all the junk in the patch, it goes down to 35k. On to comments 'bout what it's doing. - Shouldn't MetaData::SetCharStore be called before the music catalog is loaded? - Memory usage before and after using the patch is identical. Tested by loading freeamp, adding all tracks in MyMusic to the current playlist, and playing it. CVS: Size: 22624 RSS: 18832 CVS+patch: Size: 22608 RSS: 18808 Isaac On 28-Sep-2000 Chris Kuklewicz wrote: > The patches can be downloaded from my MIT AFS account : > http://web.mit.edu/chrisk/www/ > http://web.mit.edu/chrisk/www/freeamp-hashstore-1.cvs.patch.gz > http://web.mit.edu/chrisk/www/freeamp-hashstore-1.beta9.patch.gz > > Or my full tarball (from my personal machine, more space) : > http://kuklewicz.mit.edu/ > http://kuklewicz.mit.edu/freeamp-hashstore-1.tar.gz > > freeamp-hashstore-1.cvs.patch.gz is against latest CVS at 8:20PM EST > on Sept. 27,2000 (made with diff -uPr -x CVS freeamp freeamp-hashstore >| gzip > /home/shared/mit/freeamp-hashstore-1.cvs.patch.gz) > > freeamp-hashstore-1.beta9.patch.gz is against 2.1 beta 9 tar.gz > > If people need a full > ___ > [EMAIL PROTECTED] > http://www.freeamp.org/mailman/listinfo/freeamp-dev ___ [EMAIL PROTECTED] http://www.freeamp.org/mailman/listinfo/freeamp-dev
Re: URL of patch for HashStore
On Wed, Sep 27, 2000 at 11:03:08PM -0700, Mark B. Elrod wrote: > a note i found a new version of patch but the patch files aren't > gzipped. > > elrod My files are gzip'd. So it must have decompressed during transmission. Web browsers can be sneaky that way. [chrisk@kuklewicz www]$ file f*.gz freeamp-hashstore-1.beta9.patch.gz: gzip compressed data, deflated, last modified: Wed Sep 27 20:28:23 2000, os: Unix freeamp-hashstore-1.cvs.patch.gz: gzip compressed data, deflated, last modified: Wed Sep 27 20:27:03 2000, os: Unix [chrisk@kuklewicz www]$ file /home/httpd/html/freeamp-hashstore-1.tar.gz /home/httpd/html/freeamp-hashstore-1.tar.gz: gzip compressed data, deflated, last modified: Wed Sep 27 20:47:21 2000, os: Unix > > Chris Kuklewicz wrote: > > > The patches can be downloaded from my MIT AFS account : > > http://web.mit.edu/chrisk/www/ > > http://web.mit.edu/chrisk/www/freeamp-hashstore-1.cvs.patch.gz > > http://web.mit.edu/chrisk/www/freeamp-hashstore-1.beta9.patch.gz > > > > Or my full tarball (from my personal machine, more space) : > > http://kuklewicz.mit.edu/ > > http://kuklewicz.mit.edu/freeamp-hashstore-1.tar.gz > > > > freeamp-hashstore-1.cvs.patch.gz is against latest CVS at 8:20PM EST > > on Sept. 27,2000 (made with diff -uPr -x CVS freeamp freeamp-hashstore > > | gzip > /home/shared/mit/freeamp-hashstore-1.cvs.patch.gz) > > > > freeamp-hashstore-1.beta9.patch.gz is against 2.1 beta 9 tar.gz > > ___ [EMAIL PROTECTED] http://www.freeamp.org/mailman/listinfo/freeamp-dev
Re: URL of patch for HashStore
a note i found a new version of patch but the patch files aren't gzipped. elrod Chris Kuklewicz wrote: > The patches can be downloaded from my MIT AFS account : > http://web.mit.edu/chrisk/www/ > http://web.mit.edu/chrisk/www/freeamp-hashstore-1.cvs.patch.gz > http://web.mit.edu/chrisk/www/freeamp-hashstore-1.beta9.patch.gz > > Or my full tarball (from my personal machine, more space) : > http://kuklewicz.mit.edu/ > http://kuklewicz.mit.edu/freeamp-hashstore-1.tar.gz > > freeamp-hashstore-1.cvs.patch.gz is against latest CVS at 8:20PM EST > on Sept. 27,2000 (made with diff -uPr -x CVS freeamp freeamp-hashstore > | gzip > /home/shared/mit/freeamp-hashstore-1.cvs.patch.gz) > > freeamp-hashstore-1.beta9.patch.gz is against 2.1 beta 9 tar.gz > > If people need a full > ___ > [EMAIL PROTECTED] > http://www.freeamp.org/mailman/listinfo/freeamp-dev ___ [EMAIL PROTECTED] http://www.freeamp.org/mailman/listinfo/freeamp-dev