heavily optimized journal-cleanup - project unloading is now unbelievable fast

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1073 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-06-05 12:48:53 +00:00
parent 599d515791
commit dd06154ed6
5 changed files with 21 additions and 17 deletions

View File

@@ -1,3 +1,15 @@
2008-06-05 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* include/note.h:
* include/note_play_handle.h:
removed obsolete FASTCALL-attributes
* include/project_journal.h:
* src/core/project_journal.cpp:
* src/core/song.cpp:
heavily optimized journal-cleanup - project unloading is now
unbelievable fast!
2008-06-05 Paul Giblock <drfaygo/at/gmail/dot/com>
* data/themes/default/style.css:

View File

@@ -2,8 +2,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT(lmms, 0.4.0-svn20080604, lmms-devel/at/lists/dot/sf/dot/net)
AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20080604)
AC_INIT(lmms, 0.4.0-svn20080605, lmms-devel/at/lists/dot/sf/dot/net)
AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20080605)
AM_CONFIG_HEADER(config.h)

View File

@@ -1,7 +1,7 @@
/*
* project_journal.h - declaration of class projectJournal
*
* Copyright (c) 2006-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -78,13 +78,7 @@ public:
// journalling information about the ID get's lost
void forgetAboutID( const jo_id_t _id );
void clearJournal( void )
{
m_journalEntries.clear();
m_currentJournalEntry = m_journalEntries.end();
}
void clearInvalidJournallingObjects( void );
void clearJournal( void );
journallingObject * getJournallingObject( const jo_id_t _id )
{

View File

@@ -105,8 +105,7 @@ void projectJournal::journalEntryAdded( const jo_id_t _id )
jo_id_t projectJournal::allocID( journallingObject * _obj )
{
const jo_id_t EO_ID_MAX = 1 << 20;
const jo_id_t EO_ID_MAX = 1 << 24;
jo_id_t id;
while( m_joIDs.contains( id = static_cast<jo_id_t>( (float) rand() /
RAND_MAX * EO_ID_MAX ) ) )
@@ -151,21 +150,21 @@ void projectJournal::forgetAboutID( const jo_id_t _id )
void projectJournal::clearInvalidJournallingObjects( void )
void projectJournal::clearJournal( void )
{
m_journalEntries.clear();
m_currentJournalEntry = m_journalEntries.end();
for( joIDMap::iterator it = m_joIDs.begin(); it != m_joIDs.end(); )
{
if( it.value() == NULL )
{
forgetAboutID( it.key() );
it = m_joIDs.begin();
it = m_joIDs.erase( it );
}
else
{
++it;
}
}
//clearJournal();
}

View File

@@ -730,7 +730,6 @@ void song::clearProject( void )
emit dataChanged();
engine::getProjectJournal()->clearInvalidJournallingObjects();
engine::getProjectJournal()->clearJournal();
engine::getProjectJournal()->setJournalling( TRUE );