Perhaps on my other queries, but I don't think so on the spinsquare
example.  Here's the code to create the model and query: 

                baseModel = maker.createModel(this.URI, false);
                ontSpec = new OntModelSpec(OntModelSpec.OWL_MEM);
                memModel = ModelFactory.createOntologyModel(ontSpec,
baseModel);
                memModel.read(this.URI, "N3");
                ARQ2SPIN a2s = new ARQ2SPIN(memModel); 
                arqQuery = ARQFactory.get().createQuery(memModel,
arqQueryString);

Timing for just the last line is almost 1 second.  Note though that the
baseModel is setup as a database backed model, e.g.

                ModelMaker maker;
                // create a database connection
                conn = ModelFactory.createSimpleRDBConnection(DB_URI,
                                DB_USER, DB_PASSWD, DB);

                // create a model maker connection parameters
                maker = ModelFactory.createModelRDBMaker(conn);
                
                baseModel = maker.createModel(URI, false);


-----Original Message-----
From: Holger Knublauch [mailto:hol...@topquadrant.com] 
Sent: Wednesday, May 06, 2009 10:04 AM
To: topbraid-composer-users@googlegroups.com
Subject: [tbc-users] Re: ARQ2SPIN performance


Hi Jeff,

I cannot imagine that converting an ARQ query to SPIN would take a
second :)  Perhaps do you have inferencing turned on in your OntModel
that you operate on?

Holger


On May 6, 2009, at 6:07 AM, Schmitz, Jeffrey A wrote:

>
> Hello,
>   In using the ARQ2SPIN class to convert my sparql queries to SPIN 
> queries I've noticed the conversions seem to be fairly slow.  For 
> example, using the spinsquare model, converting the following query:
>
> CONSTRUCT
>  { ?this spinsquare:area ?area .}
> WHERE
>  { ?this rdf:type ?TYPE_CLASS .
>    ?this spinsquare:width ?width .
>    ?this spinsquare:height ?height
>    LET (?area := spinsquare:twoDimArea(?width, ?height))  }
>
> Using:
>
>   org.topbraid.spin.model.Query spinQuery = a2s.createQuery(arqQuery, 
> null);
>
> Takes almost a second, and that is just for the above line.  Note that

> twoDimArea is a spin:Function I defined that simply multiplies the
> args:
>
> SELECT ?result
> WHERE {
>    LET (?result := (?arg1 * ?arg2)) .
> }
>
> Is this normal, or might there be something wrong with my setup?  As 
> the queries and models get a little more complex, the timings go up 
> too, with some of my queries taking 5 seconds and more to simply 
> convert to SPIN queries.
>
> Thanks,
> Jeff
>
> >




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
To post to this group, send email to topbraid-composer-users@googlegroups.com
To unsubscribe from this group, send email to 
topbraid-composer-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/topbraid-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to