Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dali-dev] quickly getting a list of Entites

Hi Tom,

It does take a little time to fill a project, in that all the files in the project have to be scanned to see if they're interesting, content created, content *connected* (and this takes some time). We can look into this (I'm *sure* we will, as we polish and make our API a little readier for prime time). 10 seconds seems pretty long to me. I haven't experienced delays that long. Even if there only a few entities, if there are a lot of java classes and other files, it *might* take that long to scan through everything. The code you're using is something we typically put in a background thread. We launch it once while we're doing other things, so maybe we just don't notice how long it is.

One thing you can do is to use JpaModelManager#getFilledJpaModel() - this should fill all the projects in the workspace in one fell swoop. This would at least put your delay in one place, and probably would remove some overlap.

--
Paul Fullbright
Oracle Corp.
Eclipse Dali/Java Persistence Tools Development
paul.fullbright@xxxxxxxxxx



Tom Mutdosch wrote:
Hi Neil,

Returning to this hijacked thread :)

While I'm sure there is some delay associated with initializing the Dali plugins, this appears to be separate from that. I have about 10 projects in my workspace, and once my workspace is open, if I go to each one and call:
   JpaModelManager.instance().getFilledJpaProject(project)
there is a noticeable delay that averages about 10 seconds the first time I call this method on each project. Even if there are no entities in the project, it still takes 5-7 seconds. The Dali team may not run into this as much, since in my case we are calling this method outside of the Java editor from an external wizard; so it may be a different code path. But the delay can be pretty noticeable to the user in our wizard case. It doesn't really seem to be an issue of "priming" the plugins; I'm wondering if when this method is called outside of the editor, performance could be improved if perhaps some notifications could not be sent (such as any property view events, etc, since they would not be applicable). I'm sure performance isn't the highest priority right now, but this may be one area that can be looked at at at some point.

All this said, returning to the subject line, I'm assuming that getFilledJpaProject() would still be considered the best way to retrieve the entities in the project?


Thanks
Tom



Neil Hauge <neil.hauge@xxxxxxxxxx> Sent by: dali-dev-bounces@xxxxxxxxxxx
06/05/2007 05:23 PM
Please respond to
neil.hauge@xxxxxxxxxx; Please respond to
"General Dali EJB ORM developer discussion." <dali-dev@xxxxxxxxxxx>


To
"General Dali EJB ORM developer discussion." <dali-dev@xxxxxxxxxxx>
cc

Subject
Re: [dali-dev] quickly getting a list of Entites






Hi Tom,

We are wondering if the delay on your first access is related to our plugins being (lazily) loaded, in addition to filling the model. What type of delay are you seeing with your first query for the entities?

I'm hoping that a model fill for 3 entities would be pretty quick, but if it also requires plug-in initialization, that could be the cause of the delay. You might need to prime the plugins at an earlier point to get a better response in your UI, but this is just a theory.

Neil

Tom Mutdosch wrote:


_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev


Back to the top