I have switch over from SDB to TDB to see if I can get better performance. In the following, Database is a class of mine that insulated the code from knowing if it is SDB or TDB.
I do the following, which combines 2 models I have stored in TDB and then reads a third small model from a file that contains some classes I want to “test”. I then have some code that times how long it takes to get a particular class and list its instances. Model model1 = Database.getICD9inferredModel(); Model model2 = Database.getPatientModel(); OntModel omodel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_MICRO_RULE_INF, model1); omodel.add(model2); InputStream in = FileManager.get().open(fileName); omodel.read(in, baseName, "TURTLE"); OntClass oclass = omodel.getOntClass(line); // access the class On the first call to getOntClass, I have been seeing a VERY long wait (around an hour) before I get a response. Then after that first call, subsequent calls are much faster. But I started looking at the CPU utilization. After the call to getOntClass, CPU utilization is very close to 0. Is this to be expected? Is there any form of tracing/logging that can be turned on to determine what (if anything) is happening? Is there something I am doing wrong in setting up my models? For the ICD9 ontology I am using, I had read in the OWL data, created an OntModel with it, wrote this OntModel data out. Then I store the data from the OntModel into TDB, so it supposedly does not have to do as much work at runtime. Yet, performance is still awful. David Jordan Software Developer SAS Institute Inc. Health & Life Sciences, Research & Development Bldg R ▪ Office 4467 600 Research Drive ▪ Cary, NC 27513 Tel: 919 531 1233 ▪ [email protected]<mailto:[email protected]> www.sas.com<http://www.sas.com> SAS® … THE POWER TO KNOW®
