Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] performance problems

Amal Zouaq amal.zouaq at gmail.com
Mon Apr 9 12:36:25 PDT 2007


I am still getting errors when deleting or adding instances (but not
always). I changed the JDBC driver to a JDataServer. Any idea would be
helpful...
Thank you very much.
Here is the last error that I am getting in "individual.delete()":

Exception in thread "AWT-EventQueue-0" *java.lang.NullPointerException
*

at JData2_0.sql.$BoundParams.Copy(Unknown Source)

at JData2_0.sql.$PreparedStatement.addBatch(Unknown Source)

at edu.stanford.smi.protege.storage.database.DatabaseFrameDb.addValuesSQL(Unknown
Source)

at edu.stanford.smi.protege.storage.database.DatabaseFrameDb.setValues(Unknown
Source)

at
edu.stanford.smi.protege.storage.database.ValueCachingNarrowFrameStore.setValues(Unknown
Source)

at edu.stanford.smi.protege.model.framestore.IncludingKBAdapter.setValues(Unknown
Source)

at
edu.stanford.smi.protege.model.framestore.MergingNarrowFrameStore.setValues(Unknown
Source)

at
edu.stanford.smi.protege.model.framestore.ClosureCachingBasicFrameStore.setValues(Unknown
Source)

at
edu.stanford.smi.protege.model.framestore.SimpleFrameStore.setDirectOwnSlotValues(Unknown
Source)

at
edu.stanford.smi.protege.model.framestore.FrameStoreAdapter.setDirectOwnSlotValues(Unknown
Source)

at
edu.stanford.smi.protegex.owl.model.framestore.LocalClassificationFrameStore.setDirectOwnSlotValues(Unknown
Source)

at
edu.stanford.smi.protege.model.framestore.FrameStoreAdapter.setDirectOwnSlotValues(Unknown
Source)

at
edu.stanford.smi.protegex.owl.model.framestore.LocalClassificationFrameStore.setDirectOwnSlotValues(Unknown
Source)

at
edu.stanford.smi.protege.model.framestore.EventGeneratorFrameStore.setDirectOwnSlotValues(Unknown
Source)

at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at
edu.stanford.smi.protege.model.framestore.AbstractFrameStoreInvocationHandler.invoke(Unknown
Source)

at
edu.stanford.smi.protege.model.framestore.AbstractFrameStoreInvocationHandler.invoke(Unknown
Source)

at
edu.stanford.smi.protegex.owl.model.framestore.OWLFrameFactoryInvocationHandler.handleInvoke(Unknown
Source)

at
edu.stanford.smi.protege.model.framestore.AbstractFrameStoreInvocationHandler.invoke(Unknown
Source)

at $Proxy0.setDirectOwnSlotValues(Unknown Source)

at
edu.stanford.smi.protege.model.framestore.EventDispatchFrameStore.setDirectOwnSlotValues(Unknown
Source)

at
edu.stanford.smi.protege.model.framestore.ArgumentCheckingFrameStore.setDirectOwnSlotValues(Unknown
Source)

at
edu.stanford.smi.protege.model.framestore.ChangeMonitorFrameStore.setDirectOwnSlotValues(Unknown
Source)

at
edu.stanford.smi.protege.model.framestore.cleandispatch.DefaultDispatch.setDirectOwnSlotValues(Unknown
Source)

at
edu.stanford.smi.protege.model.framestore.cleandispatch.CleanDispatchFrameStore.setDirectOwnSlotValues(Unknown
Source)

at
edu.stanford.smi.protege.model.framestore.FrameStoreAdapter.setDirectOwnSlotValues(Unknown
Source)

at
edu.stanford.smi.protege.model.framestore.FrameStoreAdapter.setDirectOwnSlotValues(Unknown
Source)

at
edu.stanford.smi.protegex.owl.model.framestore.OWLFrameStore.setDirectOwnSlotValues(Unknown
Source)

at
edu.stanford.smi.protege.model.DefaultKnowledgeBase.setDirectOwnSlotValues(Unknown
Source)

at
edu.stanford.smi.protegex.owl.model.impl.AbstractOWLModel.setDirectOwnSlotValues(Unknown
Source)

at edu.stanford.smi.protege.model.DefaultKnowledgeBase.addOwnSlotValue(Unknown
Source)

at edu.stanford.smi.protege.model.DefaultFrame.addOwnSlotValue(Unknown
Source)

at
edu.stanford.smi.protegex.owl.model.framestore.OWLFrameStore.deleteListInstance(Unknown
Source)

at
edu.stanford.smi.protegex.owl.model.framestore.OWLFrameStore.deleteDependingListInstances(Unknown
Source)

at
edu.stanford.smi.protegex.owl.model.framestore.OWLFrameStore.deleteSimpleInstance(Unknown
Source)

at edu.stanford.smi.protege.model.DefaultKnowledgeBase.deleteSimpleInstance(Unknown
Source)

at edu.stanford.smi.protege.model.DefaultKnowledgeBase.deleteFrame(Unknown
Source)

at edu.stanford.smi.protege.model.DefaultFrame.delete(Unknown Source)

at org.umontreal.form.windowInterface.OntologyInterface.clearOntology(*
OntologyInterface.java:627*)

at org.umontreal.form.window.MainWindow$14.jMenuItemClearActionPerformed(*
MainWindow.java:361*)

at org.umontreal.form.window.MainWindow$14.actionPerformed(*MainWindow.java
:357*)

at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.setPressed(Unknown Source)

at javax.swing.AbstractButton.doClick(Unknown Source)

at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)

at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown
Source)

at java.awt.Component.processMouseEvent(Unknown Source)

at javax.swing.JComponent.processMouseEvent(Unknown Source)

at java.awt.Component.processEvent(Unknown Source)

at java.awt.Container.processEvent(Unknown Source)

at java.awt.Component.dispatchEventImpl(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Window.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)



2007/4/9, Timothy Redmond <tredmond at stanford.edu>:
>
>
>
> This looks like some sort of jdbc exception.  It looks like I have at one
> point tested the microsoft access database with Protege but I don't do this
> that often.  I will try to see if I can find a copy that I can test.  So I
> don't know if there are problems with microsoft access.  In theory protege
> will work with any jdbc database.  But we have found that in practice there
> can be adjustments that we need to make for a specific database. The
> databases that we do test are mysql, postgres, oracle and mssql.
>
>
> But one comment is that we usually try not to use the sun odbc driver for
> database.  I have had trouble with this approach with other databases
> (mysql).  It is better to use the jdbc driver that is customized for that
> particular database.
>
>
> Also I did not know that you are using a database backend.  This makes
> performance much slower (memory access happens in nanoseconds but database
> access takes milliseconds) so I will try my code against a database backend
> also.
>
>
> -Timothy
>
>
>
>  On Apr 9, 2007, at 7:05 AM, Amal Zouaq wrote:
>
>  Hello,
> I am still having problems with the deletion of instances. Here is the
> exception that I get:
>
>
> INFO:
> *sun.jdbc.odbc.JdbcOdbcBatchUpdateException*: [Microsoft][ODBC Microsoft
> Access Driver] Invalid argument.
>
> at sun.jdbc.odbc.JdbcOdbcPreparedStatement.emulateExecuteBatch(Unknown
> Source)
>
> at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeBatchUpdate(Unknown
> Source)
>
> at sun.jdbc.odbc.JdbcOdbcStatement.executeBatch(Unknown Source)
>
> at edu.stanford.smi.protege.storage.database.DatabaseFrameDb.addValuesSQL(Unknown
> Source)
>
> at edu.stanford.smi.protege.storage.database.DatabaseFrameDb.setValues(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.storage.database.ValueCachingNarrowFrameStore.setValues(Unknown
> Source)
>
> at edu.stanford.smi.protege.model.framestore.IncludingKBAdapter.setValues(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.MergingNarrowFrameStore.setValues(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.ClosureCachingBasicFrameStore.setValues(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.SimpleFrameStore.setDirectOwnSlotValues(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.FrameStoreAdapter.setDirectOwnSlotValues(Unknown
> Source)
>
> at
> edu.stanford.smi.protegex.owl.model.framestore.LocalClassificationFrameStore.setDirectOwnSlotValues(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.FrameStoreAdapter.setDirectOwnSlotValues(Unknown
> Source)
>
> at
> edu.stanford.smi.protegex.owl.model.framestore.LocalClassificationFrameStore.setDirectOwnSlotValues(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.EventGeneratorFrameStore.setDirectOwnSlotValues(Unknown
> Source)
>
> at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
>
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>
> at java.lang.reflect.Method.invoke(Unknown Source)
>
> at
> edu.stanford.smi.protege.model.framestore.AbstractFrameStoreInvocationHandler.invoke(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.AbstractFrameStoreInvocationHandler.invoke(Unknown
> Source)
>
> at
> edu.stanford.smi.protegex.owl.model.framestore.OWLFrameFactoryInvocationHandler.handleInvoke(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.AbstractFrameStoreInvocationHandler.invoke(Unknown
> Source)
>
> at $Proxy0.setDirectOwnSlotValues(Unknown Source)
>
> at
> edu.stanford.smi.protege.model.framestore.EventDispatchFrameStore.setDirectOwnSlotValues(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.ArgumentCheckingFrameStore.setDirectOwnSlotValues(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.ChangeMonitorFrameStore.setDirectOwnSlotValues(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.cleandispatch.DefaultDispatch.setDirectOwnSlotValues(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.cleandispatch.CleanDispatchFrameStore.setDirectOwnSlotValues(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.FrameStoreAdapter.setDirectOwnSlotValues(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.DeleteSimplificationFrameStore.removeOwnSlotValue(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.DeleteSimplificationFrameStore.deleteReferences(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.DeleteSimplificationFrameStore.internalDeleteFrame(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.DeleteSimplificationFrameStore.internalDeleteInstance(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.DeleteSimplificationFrameStore.internalDeleteSimpleInstance(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.DeleteSimplificationFrameStore.deleteSimpleInstance(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.framestore.FrameStoreAdapter.deleteSimpleInstance(Unknown
> Source)
>
> at
> edu.stanford.smi.protegex.owl.model.framestore.OWLFrameStore.deleteSimpleInstance(Unknown
> Source)
>
> at
> edu.stanford.smi.protege.model.DefaultKnowledgeBase.deleteSimpleInstance(Unknown
> Source)
>
> at edu.stanford.smi.protege.model.DefaultKnowledgeBase.deleteFrame(Unknown
> Source)
>
> at edu.stanford.smi.protege.model.DefaultFrame.delete(Unknown Source)
>
> at org.umontreal.form.windowInterface.OntologyInterface.clearOntology(
> *OntologyInterface.java:608*)
>
> at org.umontreal.form.window.MainWindow$14.jMenuItemClearActionPerformed(
> *MainWindow.java:361*)
>
> at org.umontreal.form.window.MainWindow$14.actionPerformed(
> *MainWindow.java:357*)
>
> at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
>
> at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
>
> at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
>
> at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
>
> at javax.swing.AbstractButton.doClick(Unknown Source)
>
> at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
>
> at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown
> Source)
>
> at java.awt.Component.processMouseEvent(Unknown Source)
>
> at javax.swing.JComponent.processMouseEvent(Unknown Source)
>
> at java.awt.Component.processEvent(Unknown Source)
>
> at java.awt.Container.processEvent(Unknown Source)
>
> at java.awt.Component.dispatchEventImpl(Unknown Source)
>
> at java.awt.Container.dispatchEventImpl(Unknown Source)
>
> at java.awt.Component.dispatchEvent(Unknown Source)
>
> at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
>
> at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
>
> at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
>
> at java.awt.Container.dispatchEventImpl(Unknown Source)
>
> at java.awt.Window.dispatchEventImpl(Unknown Source)
>
> at java.awt.Component.dispatchEvent(Unknown Source)
>
> at java.awt.EventQueue.dispatchEvent(Unknown Source)
>
> at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
>
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
>
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>
> at java.awt.EventDispatchThread.run(Unknown Source)
> I am using the code that Timothy suggested.  Any idea about the problem ?
> I hope that the database is not corrupted. Corruption happened twice these
> last days just after deletions... I am using the last version of Protégé and
> my database is now exceeding 2 GB.
>
> Thanks.
>
> Amal.
>
>
> 2007/4/6, Timothy Redmond <tredmond at stanford.edu>:
> >
> >
> > I think that your problem with the deletions is occurring because of an
> > interaction with the graphical interface.  My suspicion is that the way
> > you are running your code the graphical interface is getting updated
> > after each deletion.  I ran the following code:
> >
> >        int count = 300;
> >        OWLModel owlModel = ProtegeOWL.createJenaOWLModel();
> >
> >        OWLNamedClass c = owlModel.createOWLNamedClass("top");
> >        OWLIndividual[] individuals = new OWLIndividual[count];
> >        for (int i = 0; i < count; i++) {
> >            individuals[i] = c.createOWLIndividual ("myInstance" + i);
> >        }
> >        System.out.println("created class " + c + " with " +
> > c.getInstanceCount(false) + " members");
> >        System.out.println("Starting deletions");
> >        long start = System.currentTimeMillis();
> >        for (int i = 0; i < count; i++) {
> >            individuals[i].delete();
> >        }
> >        System.out.println("took " + (System.currentTimeMillis () -
> > start)  + "ms");
> >        System.out.println("class " + c + " now has " +
> > c.getInstanceCount(false) + " members");
> >
> > This reported doing 300 deletions in 172 milliseconds.  This gets
> > relatively good performance because the graphical interface is not
> > getting updated on each delete.
> >
> > So the fix to your problem depends on exactly what you are doing.
> > Controlling how the graphical interface responds to changes in the
> > knowledge base depends on event processing.  If you are running a long
> > running thread you may want to do something like
> >
> >   1. disable event generation and reload the gui
> >   2. disable event dispatch for the duration of the thread.
> >
> > The problem with option #2 is that when the event dispatch is turned on
> > again a lot of processing must be done.  Here is a skeleton that uses
> > option #1:
> >
> >        boolean eventGeneration=
> > getKnowledgeBase().setGenerateEventsEnabled(false);
> >        boolean undoEnabled = getKnowledgeBase().setUndoEnabled(false);
> >        try {
> >            ...
> >        } finally {
> >            getKnowledgeBase().setUndoEnabled(undoEnabled);
> >            getKnowledgeBase().setGenerateEventsEnabled(eventGeneration);
> >
> >        }
> >
> > ProjectManager.getProjectManager().getCurrentProjectView().reloadAll();
> >
> > Also there is apparently a version of the instances tab that handles
> > large deletions better than the current version with Protege.  I may be
> > able to find a pointer to this.
> >
> > -Timothy
> >
> >
> > Amal Zouaq wrote:
> > > Hello everyone,
> > >
> > > I was wondering if someone experienced some performance problems with
> > > a medium-size or big-size ontology ? When trying to delete the
> > > instances (either in Protégé or programmatically), Protégé gets
> > > blocked, nothing is happening (the number of instances > 500). By
> > > program (Protégé OWL API), it is working but it takes a long time to
> > > be completed. Any idea about the problem ( I have set Protégé to 256
> > > MO instead of 100 MO) ?.
> > >
> > > Thanks,
> > >
> > > Amal.
> > >
> > ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > protege-owl mailing list
> > > protege-owl at lists.stanford.edu
> > > https://mailman.stanford.edu/mailman/listinfo/protege-owl
> > >
> > > Instructions for unsubscribing:
> > http://protege.stanford.edu/doc/faq.html#01a.03
> > >
> >
> > _______________________________________________
> > protege-owl mailing list
> > protege-owl at lists.stanford.edu
> > https://mailman.stanford.edu/mailman/listinfo/protege-owl
> >
> > Instructions for unsubscribing:
> > http://protege.stanford.edu/doc/faq.html#01a.03
> >
>
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
>
> Instructions for unsubscribing:
> http://protege.stanford.edu/doc/faq.html#01a.03
>
>
>
> _______________________________________________
> protege-owl mailing list
> protege-owl at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing:
> http://protege.stanford.edu/doc/faq.html#01a.03
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-owl/attachments/20070409/8bfca8ea/attachment.html>


More information about the protege-owl mailing list