Performance improvements for saveChanges() and ICellInventory (#3586)

API break!
Fixes #3553
This commit is contained in:
fscan
2018-07-14 16:53:49 +02:00
committed by GitHub
parent 71a9bb2532
commit e809c688df
37 changed files with 292 additions and 166 deletions
@@ -561,14 +561,6 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
return this.storage;
}
public void markDirty()
{
for( int slot = 0; slot < this.storage.getSlots(); slot++ )
{
this.storage.markDirty( slot );
}
}
@Override
public TickingRequest getTickingRequest( final IGridNode node )
{
@@ -869,8 +861,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
{
this.cancelCrafting();
}
this.markDirty();
this.iHost.saveChanges();
}
private void cancelCrafting()
@@ -1251,8 +1242,8 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
public void setPriority( final int newValue )
{
this.priority = newValue;
this.markDirty();
this.iHost.saveChanges();
try
{
this.gridProxy.getGrid().postEvent( new MENetworkCraftingPatternChange( this, this.gridProxy.getNode() ) );