Skip to content

Commit fd7586c

Browse files
authored
Chage dirty manage implementation in BCs to get better performance (#952)
Issue 203831
1 parent eaa8c96 commit fd7586c

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

common/src/main/java/com/genexus/GxSilentTrnSdt.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
package com.genexus;
2-
import com.genexus.ModelContext;
2+
33
import com.genexus.common.interfaces.IPendingEventHelper;
44
import com.genexus.common.interfaces.SpecificImplementation;
55
import com.genexus.diagnostics.core.ILogger;
66
import com.genexus.diagnostics.core.LogManager;
77
import com.genexus.util.GXProperties;
88

9-
import java.io.InputStream;
10-
import java.io.StringWriter;
119
import java.lang.reflect.Method;
1210
import java.util.HashMap;
1311
import java.util.HashSet;
14-
15-
import com.genexus.xml.GXXMLSerializer;
12+
import java.util.Set;
1613

1714
public class GxSilentTrnSdt extends com.genexus.xml.GXXMLSerializable
1815
{
1916
static final ILogger logger = LogManager.getLogger(GxSilentTrnSdt.class);
2017
static final String SET_METHOD_PREFIX = "setgxTv_";
2118
static final String GET_METHOD_PREFIX = "getgxTv_";
2219
IPendingEventHelper pendingHelper;
23-
GXProperties dirties = new GXProperties();
20+
Set<String> dirties = new HashSet<>();
2421

2522
IGxSilentTrn trn;
2623
public GxSilentTrnSdt( ModelContext context, String type)
@@ -238,14 +235,12 @@ public boolean InsertOrUpdate()
238235

239236
public void SetDirty(String fieldName)
240237
{
241-
dirties.put(fieldName.toLowerCase(), "true");
238+
dirties.add(fieldName.toLowerCase());
242239
}
243240
@Override
244241
public boolean IsDirty(String fieldName)
245242
{
246-
if (dirties.containsKey(fieldName.toLowerCase()))
247-
return true;
248-
return false;
243+
return dirties.contains(fieldName.toLowerCase());
249244
}
250245

251246
public GXProperties getMetadata()

0 commit comments

Comments
 (0)