Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29 FamiTracker
Login:
Menu:
Post: Author:
FamiTracker > General > Bug Reports & Feature Requests > Remove matching patterns Owner: Shiru New post
Page 1 of 1 Sort:  
Remove matching patterns Posted: 2011-10-18 16:03  (Last Edited: 2011-10-18 16:03) Reply | Quote
Shiru



Member for: 4890 days
Location: Russia, Moscow
Status: Offline

#24508
I just noticed that FT compiler does not try to remove patterns if they has 100% matching copy. This often happens when you create new frames and use copy/paste. I create completely new frames and copy all the channels in case I may need to make minor changes later, to prevent accidental changes of some pattern that is used somewhere else. This leads to noticeably larger data size after compilation. It does not matter much for NSF compiler, but if you want to make a NES program using FT player with large amount of music, this is a problem.

So, it would be very nice to have 'remove matching patterns' feature in some form, maybe as editor function, or just as an additional compile stage.

Posted: 2011-10-18 22:39  (Last Edited: 2011-10-18 22:40) Reply | Quote
Shiru



Member for: 4890 days
Location: Russia, Moscow
Status: Offline

#24511
As I need this feature now, I've made a custom build (with Trial version, any attempts to use free versions + adding MFC has failed) for personal use. I've added [url=http://codepaste.net/p6k46u]this code into CFamiTrackerDoc::OnEditRemoveUnusedPatterns, before the cleanup loop.

Posted: 2011-10-28 00:50 Reply | Quote
jsr
Administrator

Avatar

Member for: 5924 days
Location: Sweden
Status: Offline

#24876
I've started adding removal of duplicated patterns to the exporter. Tell me if you want it as a menu option too.

_______________________
Programmer and developer
Posted: 2011-10-28 01:05  (Last Edited: 2011-10-28 01:05) Reply | Quote
Shiru



Member for: 4890 days
Location: Russia, Moscow
Status: Offline

#24880
Exporter should be enough, can't think up reasons to use this function other than reducing exported data size.

Another possible size optimization is volume column cleanup. I noticed that

[quote=]C-4 F
C-4 .
C-4 .
...[/quote]

produces less data than

[quote=]C-4 F
C-4 F
C-4 F
...[/quote]

Although this situation is not common in real modules, it is possible as result of extensive copy/paste.

Page 1 of 1 Sort: