[Glass] [Seaside] Progress bar for database query

Richard Sargent via Glass glass at lists.gemtalksystems.com
Fri Oct 16 09:10:51 PDT 2015


GLASS mailing list wrote
> Ciao Mariano,
> 
> 	thanks for your considerations.
> 
>> Hi Dario,
>> 
>> It looks strange to me that a query to GemStone could take that much. Did
>> you profile it?  how many rows has the collection? which type of
>> collection is it?   the complexity / time goes into the "condition"
>> rather in the select?
>> I ask because many times I was in the same situation, after a quick
>> profiling,
> 	
> 	I don't have experience into index.
> 
>> I noticed that adding an index would solve it.
> 
> 	I defined my request as 'query'   but, i think,	it is not a query on
> possible indexed data.
> 
> 	My query is relative to the some dictionaries ( one dictionary for any
> day ) everyone with a dictionary about the documents ( 200 - 300 ) 
> managed on the day.
> 
> 	Every document is based on a bag of items ecc.  ecc.. ecc...

Dario, it sounds like you have been using dictionaries to provide "access
paths" to your objects. Indexes are the high-performance equivalent to this.
In GemStone, you would want to have a single collection holding "all"
instances of the same class, and possibly of related classes, too. (I say
"all" in quotes, because it isn't an absolute.)

The indexes then allow you to readily locate those objects which have the
necessary characteristics. e.g. created on a specific date, created on any
date in a date range, etc. Authored by a specific user, about a specific
customer, and so on. Indexes allow O(1) access to subsets, rather than O(n).


I am guessing you have used the dictionaries for a Pharo implementation,
since it doesn't have indexes, and have strictly ported your application to
GemStone/S. If you need to run in both environments, you have limited
choices. Still, you could also add the documents to an "everything"
collection which has indexes in GemStone and so use indexed queries in
GemStone and use regular dictionary traversals in Pharo.



> 
> 	With my surprise when i have 2 - 3 moths on-line all works fine.  ( the
> SPC is set to 2097152 )
> 
> 	But now when i have 6 months on-line the system answer with some delay.
> 
> 	My goal for now is to have online 12 months.
> 
> 	I need to change  my internal structure ?
> 
> 	Cheers,
> 			
> 		Dario
> 
> 	
> 
>> 
>> Cheers,
>>  
>> 
>> ---------- Forwarded message ----------
>> From: 

> dtrussardi@

>  <

> dtrussardi@

> >
>> Date: Thu, Oct 15, 2015 at 9:23 AM
>> Subject: [Seaside] Progress bar for database query
>> To: seaside-wiki <

> seaside at .squeakfoundation

> >
>> 
>> 
>> Ciao,
>> 
>>         i have a seaside application with some user interface.
>> 
>>         Now i have one specific user request for query the database.
>> 
>>         This request required some long time on the server before answer.
>> 
>>         My goal is to :
>> 
>>                 a) display a progress bar when the user submit this query
>> 
>>                 b)  block the web user request until the server answer
>> the data query result
>> 
>> 
>>         How i can implemented this solution?
>> 
>>         Thank for any considerations.
>> 
>> 
>>                 Dario
>> 
>>         _______________________________________________
>> seaside mailing list
>> 

> seaside at .squeakfoundation

>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> 
>> 
>> 
>> -- 
>> Mariano
>> http://marianopeck.wordpress.com
>> _______________________________________________
>> Glass mailing list
>> 

> Glass at .gemtalksystems

>> http://lists.gemtalksystems.com/mailman/listinfo/glass
> 
> 
> _______________________________________________
> Glass mailing list

> Glass at .gemtalksystems

> http://lists.gemtalksystems.com/mailman/listinfo/glass





--
View this message in context: http://forum.world.st/Fwd-Seaside-Progress-bar-for-database-query-tp4855770p4856053.html
Sent from the GLASS mailing list archive at Nabble.com.


More information about the Glass mailing list