[xwiki-users] Multidimensional arrays

2012-05-15 Thread Moritz Hesse (EA GmbH)
What is an appropriate way to structure multidimensional arrays in velocity?

Let's say I want to have a main topic with two subtopics with three elements
each:

1 maintopic
  1.1 subtopic1
  1.1.1 one
  1.1.2 two
  1.1.3 three
  1.2 subtopic2
  1.2.1 one
  1.2.2 two
  1.2.3 three

My approach would be:
{{velocity}}
#set( $maintopic = ["subtopic1", "subtopic2"] )
#set( $maintopic.subtopic1 = ["one", "two", "three"] )
#set( $maintopic.subtopic2 = ["one", "two", "three"] )
{{/velocity}}

But I cannot access the one-two-threes in each subtopic. What am I doing
wrong?

Thanks and best regards,
Moritz

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Multidimensional arrays

2012-05-15 Thread Thomas Mortagne
On Tue, May 15, 2012 at 10:55 AM, Moritz Hesse (EA GmbH)
 wrote:
> What is an appropriate way to structure multidimensional arrays in velocity?
>
> Let's say I want to have a main topic with two subtopics with three elements
> each:
>
> 1 maintopic
>  1.1 subtopic1
>      1.1.1 one
>      1.1.2 two
>      1.1.3 three
>  1.2 subtopic2
>      1.2.1 one
>      1.2.2 two
>      1.2.3 three
>
> My approach would be:
> {{velocity}}
> #set( $maintopic = ["subtopic1", "subtopic2"] )
> #set( $maintopic.subtopic1 = ["one", "two", "three"] )
> #set( $maintopic.subtopic2 = ["one", "two", "three"] )
> {{/velocity}}

$maintopic is a List here and not a Map so $maintopic.subtopic1 does
not mean anything.

try with

#set( $subtopic1 = ["one", "two", "three"] )
#set( $subtopic2 = ["one", "two", "three"] )
#set( $maintopic = {"subtopic1" : $subtopic1, "subtopic2" : $subtopic2} )

>
> But I cannot access the one-two-threes in each subtopic. What am I doing
> wrong?
>
> Thanks and best regards,
> Moritz
>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users



-- 
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Multidimensional arrays

2012-05-15 Thread Moritz Hesse (EA GmbH)
Amazingly easy. Thanks a lot!

> $maintopic is a List here and not a Map so $maintopic.subtopic1 does
> not mean anything.
> 
> try with
> 
> #set( $subtopic1 = ["one", "two", "three"] )
> #set( $subtopic2 = ["one", "two", "three"] )
> #set( $maintopic = {"subtopic1" : $subtopic1, "subtopic2" : $subtopic2} )

Bests,
Moritz

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] [xwiki 3.2] virtual user big performance issues

2012-05-15 Thread Merlin Olivier
Hello,

On the xwiki  3.2, we have decided to use the virtual xwiki  (multi-tenant) 
feature as it should be better for scalability and performance
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Virtualization


"Each wiki has its own database schema, thus allowing for a complete data 
separation between the different wikis in the same instance.

The main advantage of multi-tenancy is performance optimization."
Problem:
The main wiki has a relative good level of performance - with a response time 
around 2.5 second to browse a page
So we are in the xwiki database
But when we are in a virtual wiki (another schema ) - the performance are very 
poor.
The average response time is around 5 seconds  per page !!! So at list 2 times 
slower.

We are using MySQL and glassfish 3.1 - and we have done tuning on the MySQL 
database and glassfish.

We have used a profiling tool and see that the request send to the virtual 
environment are raising a big amount of exception ...
The problem is not on the database part (even if they are many SQL calls to 
visualize only one page)
The problem seems really to be on the virtual environment configuration OR in a 
file corruption ...

I have attached the exception list . (exception_list.xls)
>From this is it possible to know if we have an installation issue ??

Does someone have experience of very good performance with xwiki  ? ( response 
time #1second per page)
In that case

Best regards,
Olivier





___
Olivier Merlin
RnD Tuning/profiling community Leader
Tel: + 33.4.42.36.59.87

olivier.mer...@gemalto.com
___

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [xwiki 3.2] virtual user big performance issues

2012-05-15 Thread Thomas Mortagne
On Tue, May 15, 2012 at 5:41 PM, Merlin Olivier
 wrote:
> Hello,
>
> On the xwiki  3.2, we have decided to use the virtual xwiki  (multi-tenant) 
> feature as it should be better for scalability and performance
> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Virtualization
>
>
> "Each wiki has its own database schema, thus allowing for a complete data 
> separation between the different wikis in the same instance.
>
> The main advantage of multi-tenancy is performance optimization."
> Problem:
> The main wiki has a relative good level of performance - with a response time 
> around 2.5 second to browse a page
> So we are in the xwiki database
> But when we are in a virtual wiki (another schema ) - the performance are 
> very poor.
> The average response time is around 5 seconds  per page !!! So at list 2 
> times slower.
>
> We are using MySQL and glassfish 3.1 - and we have done tuning on the MySQL 
> database and glassfish.
>
> We have used a profiling tool and see that the request send to the virtual 
> environment are raising a big amount of exception ...
> The problem is not on the database part (even if they are many SQL calls to 
> visualize only one page)
> The problem seems really to be on the virtual environment configuration OR in 
> a file corruption ...
>
> I have attached the exception list . (exception_list.xls)

The attachments don't go through the mailing list.

> From this is it possible to know if we have an installation issue ??
>
> Does someone have experience of very good performance with xwiki  ? ( 
> response time #1second per page)
> In that case

The performances on xwiki.org or myxwiki.org is usually not bad
(except sometime when there is some specific issue with the server).

xwiki.org has a lot of users and myxwiki.org a lot of wikis.

>
> Best regards,
> Olivier
>
>
>
>
>
> ___
> Olivier Merlin
> RnD Tuning/profiling community Leader
> Tel: + 33.4.42.36.59.87
>
> olivier.mer...@gemalto.com
> ___
>
>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>



-- 
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [xwiki 3.2] virtual user big performance issues

2012-05-15 Thread Vincent Massol
Hi Merlin,

On May 15, 2012, at 5:41 PM, Merlin Olivier wrote:

> Hello,
> 
> On the xwiki  3.2, we have decided to use the virtual xwiki  (multi-tenant) 
> feature as it should be better for scalability and performance
> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Virtualization
> 
> 
> "Each wiki has its own database schema, thus allowing for a complete data 
> separation between the different wikis in the same instance.
> 
> The main advantage of multi-tenancy is performance optimization."
> Problem:
> The main wiki has a relative good level of performance - with a response time 
> around 2.5 second to browse a page
> So we are in the xwiki database
> But when we are in a virtual wiki (another schema ) - the performance are 
> very poor.
> The average response time is around 5 seconds  per page !!! So at list 2 
> times slower.
> 
> We are using MySQL and glassfish 3.1 - and we have done tuning on the MySQL 
> database and glassfish.
> 
> We have used a profiling tool and see that the request send to the virtual 
> environment are raising a big amount of exception ...
> The problem is not on the database part (even if they are many SQL calls to 
> visualize only one page)
> The problem seems really to be on the virtual environment configuration OR in 
> a file corruption ...
> 
> I have attached the exception list . (exception_list.xls)
> From this is it possible to know if we have an installation issue ??
> 
> Does someone have experience of very good performance with xwiki  ? ( 
> response time #1second per page)
> In that case

I can tell you fore sure that there's no performance issue with multiwikis. 
Each wiki has its own DBs so it's really fast.

Maybe you don't have indexes set on the subwikis? I think we started setting 
them automatically in XE 3.2 but it's worth checking, see:
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Database+Administration

Thanks
-Vincent

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [xwiki 3.2] virtual user big performance issues

2012-05-15 Thread Merlin Olivier
Hello Vincent,

I have recreated the indexes on one multiwiki ... and I get the same 
performance results 
Each page are loaded in 4-5 seconds.
In fact there was an improvement in the DB usage but it was not a lot before.
The API breakdown shows me:
- 1200 ms in the classloading
- 930 ms in the XML processing
- 580 ms for the xwiki API
- 420 ms for JDBC 
- 350 ms for wiki model 
(...)

The problem of performance is really on the application server code response 
time - not in the database.
- the problem could be in the big amount of exception raised (is it normal ?)
- Glassfish 3.1 issues ? We use a 64bits deployment with a sun jdk1.6.0_26 Xms 
= Xmx = 2Gb
- 3.2 version
- the HW not sufficient ? We use a VMware with a Redhat Linux 5.7
- 2 core CPU ( X5650  @ 2.67GHz )
- 4Go RAM

Any ideas ? Good config to test ? 
My next ideas would be :
- migrate to Weblogic
- migrate to xwiki 4.x

I can send you all the list of exception - it consumes a lot of CPU for me ...


Thanks for your help
Olivier




-Original Message-
From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of 
Vincent Massol
Sent: Tuesday, May 15, 2012 5:56 PM
To: XWiki Users
Subject: Re: [xwiki-users] [xwiki 3.2] virtual user big performance issues

Hi Merlin,

On May 15, 2012, at 5:41 PM, Merlin Olivier wrote:

> Hello,
> 
> On the xwiki  3.2, we have decided to use the virtual xwiki  
> (multi-tenant) feature as it should be better for scalability and 
> performance 
> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Virtualization
> 
> 
> "Each wiki has its own database schema, thus allowing for a complete data 
> separation between the different wikis in the same instance.
> 
> The main advantage of multi-tenancy is performance optimization."
> Problem:
> The main wiki has a relative good level of performance - with a 
> response time around 2.5 second to browse a page So we are in the 
> xwiki database But when we are in a virtual wiki (another schema ) - the 
> performance are very poor.
> The average response time is around 5 seconds  per page !!! So at list 2 
> times slower.
> 
> We are using MySQL and glassfish 3.1 - and we have done tuning on the MySQL 
> database and glassfish.
> 
> We have used a profiling tool and see that the request send to the virtual 
> environment are raising a big amount of exception ...
> The problem is not on the database part (even if they are many SQL 
> calls to visualize only one page) The problem seems really to be on the 
> virtual environment configuration OR in a file corruption ...
> 
> I have attached the exception list . (exception_list.xls) From this is 
> it possible to know if we have an installation issue ??
> 
> Does someone have experience of very good performance with xwiki  ? ( 
> response time #1second per page) In that case

I can tell you fore sure that there's no performance issue with multiwikis. 
Each wiki has its own DBs so it's really fast.

Maybe you don't have indexes set on the subwikis? I think we started setting 
them automatically in XE 3.2 but it's worth checking, see:
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Database+Administration

Thanks
-Vincent

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] [xwiki 3.2] virtual user big performance issues

2012-05-15 Thread Thomas Mortagne
On Tue, May 15, 2012 at 6:55 PM, Merlin Olivier
 wrote:
> Hello Vincent,
>
> I have recreated the indexes on one multiwiki ... and I get the same 
> performance results
> Each page are loaded in 4-5 seconds.
> In fact there was an improvement in the DB usage but it was not a lot before.
> The API breakdown shows me:
> - 1200 ms in the classloading
> - 930 ms in the XML processing
> - 580 ms for the xwiki API
> - 420 ms for JDBC
> - 350 ms for wiki model
> (...)
>
> The problem of performance is really on the application server code response 
> time - not in the database.
> - the problem could be in the big amount of exception raised (is it normal ?)

No it's not normal and yes it's probably related.

> - Glassfish 3.1 issues ? We use a 64bits deployment with a sun jdk1.6.0_26 
> Xms = Xmx = 2Gb
> - 3.2 version
> - the HW not sufficient ? We use a VMware with a Redhat Linux 5.7
>        - 2 core CPU ( X5650  @ 2.67GHz )
>        - 4Go RAM
>
> Any ideas ? Good config to test ?
> My next ideas would be :
> - migrate to Weblogic
> - migrate to xwiki 4.x
>
> I can send you all the list of exception - it consumes a lot of CPU for me ...

Yes please or put them somewhere and send the link.

>
>
> Thanks for your help
> Olivier
>
>
>
>
> -Original Message-
> From: users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] On Behalf Of 
> Vincent Massol
> Sent: Tuesday, May 15, 2012 5:56 PM
> To: XWiki Users
> Subject: Re: [xwiki-users] [xwiki 3.2] virtual user big performance issues
>
> Hi Merlin,
>
> On May 15, 2012, at 5:41 PM, Merlin Olivier wrote:
>
>> Hello,
>>
>> On the xwiki  3.2, we have decided to use the virtual xwiki
>> (multi-tenant) feature as it should be better for scalability and
>> performance
>> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Virtualization
>>
>>
>> "Each wiki has its own database schema, thus allowing for a complete data 
>> separation between the different wikis in the same instance.
>>
>> The main advantage of multi-tenancy is performance optimization."
>> Problem:
>> The main wiki has a relative good level of performance - with a
>> response time around 2.5 second to browse a page So we are in the
>> xwiki database But when we are in a virtual wiki (another schema ) - the 
>> performance are very poor.
>> The average response time is around 5 seconds  per page !!! So at list 2 
>> times slower.
>>
>> We are using MySQL and glassfish 3.1 - and we have done tuning on the MySQL 
>> database and glassfish.
>>
>> We have used a profiling tool and see that the request send to the virtual 
>> environment are raising a big amount of exception ...
>> The problem is not on the database part (even if they are many SQL
>> calls to visualize only one page) The problem seems really to be on the 
>> virtual environment configuration OR in a file corruption ...
>>
>> I have attached the exception list . (exception_list.xls) From this is
>> it possible to know if we have an installation issue ??
>>
>> Does someone have experience of very good performance with xwiki  ? (
>> response time #1second per page) In that case
>
> I can tell you fore sure that there's no performance issue with multiwikis. 
> Each wiki has its own DBs so it's really fast.
>
> Maybe you don't have indexes set on the subwikis? I think we started setting 
> them automatically in XE 3.2 but it's worth checking, see:
> http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Database+Administration
>
> Thanks
> -Vincent
>
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
> ___
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users



-- 
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users