Project

General

Profile

« Previous | Next » 

Revision 52356

Additional logs to confirm we can and must improve how the result list is prepared and returned to the caller

View differences:

modules/cnr-data-information-oai-publisher/trunk/src/main/java/eu/dnetlib/data/information/oai/publisher/core/DNetOAICore.java
89 89
		// if the number of records changed, then for sure we can invalidate the resumption token, unless we have a new total of -1 (date
90 90
		// range queries can't be counted for performance reasons)
91 91
		if ((total != -1) && (oldCount != total)) throw new BadResumptionTokenException(resumptionToken);
92

  
92
		long start = System.currentTimeMillis();
93 93
		ListDocumentsInfo res = this.prepareListDocumentsInfo(results, mdf, query, resToken.getRequestedSet(), resToken.getnRead(), resToken.getnMaxElements(),
94 94
				resToken.hasDateRange());
95 95
		res.setCursor(resToken.getnRead());
96
		long end = System.currentTimeMillis();
97
		log.debug("ListDocumentInfo ready in (ms): " + (end - start));
96 98
		return res;
97 99
	}
98 100

  
......
142 144
			UnaryFunction<String, String> function = getLookupClient().getUnaryFunctionFromTDSRule(mdfInfo.getTransformationRuleID());
143 145
			results = store.getRecords(query, function, !onlyIdentifiers, pageSize);
144 146
		}
147
		log.debug("Got cursor");
145 148
		return results;
146 149
	}
147 150

  
modules/cnr-data-information-oai-publisher-common/trunk/src/main/java/eu/dnetlib/data/information/oai/publisher/OAIController.java
235 235
		}
236 236

  
237 237
		ListRecordsInfo infos;
238

  
238
		long start = System.currentTimeMillis();
239 239
		if (StringUtils.isBlank(resumptionToken)) {
240 240
			infos = core.listRecords(onlyIdentifiers, metadataPrefix, set, from, until);
241 241
		} else {
......
243 243
		}
244 244

  
245 245
		map.addAttribute("info", infos);
246
		long end = System.currentTimeMillis();
247
		log.debug("Populated map for client in (ms): " + (end - start));
246 248

  
247 249
		if (verb == OAI_VERBS.LIST_RECORDS) return "oai/OAI_ListRecords";
248 250

  

Also available in: Unified diff