Twitter
Black Ice Development | Relation fields | Part 1 PDF Send Print
Sunday, 25 December 2011

I am going home finishing very productive day but with very serious problem left unsolved. I think morning I will have brighter head to solve it best way.

I was working on Relation fields. I have finished form editing with 4 different input stiles. It is Autocomplete, Autocomplete with ajax, Checkboxes and Multiple Select as for parent as for children. Another one is modal popup but not yet started to do it. I also finished display in the list and in full article.

I used record list API to show records as in list as in full record. At first I was very excited, because even in the list all fields are available. I made special list template called “Simple List”. This template is especially to show records in modules or fields. It ideally display even a lot of data in 200px width column. This template have one feature. You can exclude fields from it. For example in the list or records in individual record like for example type “Book Author” you want list of books with book cover. You set this template and in parameters exclude all fields that are set to be displayed in the list except cover.

With new SQL engine it is not too hard for Black Ice. On the list of 10 records and each record show list of 10 records it is 0.23s. I sure this number will be bigger at final release but we will try to keep it within 1s.

And finally at 23:00 when I finished display list of children for parent I got in to endless loop. It turn out that when render relate fields in the list it cycle with endless loop.

May God give me enough mind brightness to solve this problem simple and beautifully tomorrow morning. Without cutting down features. Because relation is one of the central feature and I want it to be as flexible as possible at the same time simple for understanding.

Next week I hope I’ll show video how it works.

SerhioAvatar
Sergey Romanov STAFF
 
Votes: 2
Replies: 4
Hits: 3373


Comments
nuclearcrashAvatar
Written by: nuclearcrash
On 25 December 2011

Very goood ! :d

clowrideAvatar
Written by: clowride VIP
On 25 December 2011

yes relation is one of the central feature and your work is realy excellent

thank you

sackgesichtAvatar
Written by: sackgesicht VIP
On 26 December 2011

Sergey,

since you mentioned that "relation is one of the central features", maybe it would be worth to investigate if it makes sense to store the relation in a different INT field (not fields_value) with its own index out of performance reasons when handling a bigger number of records ... 

SerhioAvatar
Written by: Serhio STAFF
On 26 December 2011

I did small investigation. It turn out that difference is not so big.

Another fact that all queries to record_values table will be simple. I mean those will be subqueries. No joins. This shows no problems on queries analyzation right now.

But I am sure you are rignt and strict type DB would work much quicker. I mean if we would store vield values as Date, Integer, Text or varchar depending on field type.

But I would not like to add another table. And anyway it will be the same table and the same queries. The difefrence is only mysql field type.

Another fact that I learned that mysql very easy convert text to integers. Even if vield_value contacin string '452' if i run WHERE field_value = 452 will work the same speed as it would work with WHERE field_value = '452'. Or may be even quicker. Because it chnage the type of bites comparision.

Login to leave a comment

 
What is best way for Download/Installation MightyExtensions?
 


Member Area



Member Activity

We have 1784 guests and 1 member online


MightyTemplate - Professional Joomla Templates