Skip to Content
0
Former Member
Jul 24, 2008 at 12:42 PM

Universe.applyOverload Method Run non-linearly slower and slower

16 Views

Universe.applyOverload Method Run non-linearly slower and slower, that is, for the 10th user and restriction we add, this method runs 1 second, however, for the 80th user and restriction we add, this method runs 8 seconds.

Customers think it's a bug for our BOE Java SDK method, could I know why this method is non-linear, and any way to improve its running speed.

The following is the code, for interator 80 times.

while (iter.hasNext())
			{
				user = (rpt_users_t) iter.next();
				IOverload overload = (IOverload) newObjs.add("Overload");
				overload.setTitle(user.getBoezh().trim());
				
				overload.setUniverse(universe.getID());
				overload.setConnection(connectionID);
				overload.getRestrictedRows().clear();
				
				overload.getRestrictedRows().add("HZB0101_T","HZB0101_T.BRANCH_COMPANY_CODE='3090100' AND HZB0101_T.DEPARTMENT_CODE='"+ user.getBmdm() + "'");
				overload.getRestrictedRows().add("BM_T","BM_T.DEPARTMENT_GROUP_CODE='" + user.getBmzdm().trim()+ "'");
				infoStore.commit(newObjs);

				// Commit to User
				IInfoObject everyone = (IInfoObject) infoStore.query(
						"Select TOP 1 SI_ID " + " From CI_SYSTEMOBJECTS "+ " Where SI_KIND='User' " + " And SI_NAME='"+ user.getBoezh().trim() + "'").get(0);
				int everyoneID = everyone.getID();
				universe.applyOverload(overload, everyoneID, true);
				//infoStore.commit(objs);
				System.out.println(user.getBoezh() + " loading...");
			}