Re: REST URL Mapping - The changes done in pattern matching Algorithm

2008-11-25 Thread Thiago Rafael Becker
I guess that the list, hash and tree manipulation functions are more interesting in this case. A bit more of information: for the inlining to be successful, the inlined function and the function that calls it must be in the same file scope. What is usually done is to declare and define the function

Re: REST URL Mapping - The changes done in pattern matching Algorithm

2008-11-24 Thread Supun Kamburugamuva
I also tried to find the C99 compatibility of Microsoft compilers. But the details are not that clear. Yes, inline functions can increase the performance. But we should consider the overhead work and complexity vs performance. If we are going to introduce inline functions, one ideal place will be f

Re: REST URL Mapping - The changes done in pattern matching Algorithm

2008-11-24 Thread Thiago Rafael Becker
I'm a unix guy, and in this platform, the portability is good for c99 (but gcc doesn't implement it completely, as you can see in [1]). Looks like Microsoft compilers are compatible with this startdard, if they implement full compatibility with C++/TR1 specification - and looks like the /TP impleme

Re: REST URL Mapping - The changes done in pattern matching Algorithm

2008-11-23 Thread Supun Kamburugamuva
Hi Thiago, Do you think we will be able to observe significant differences if we make some functions inline? Supun. On Sat, Nov 22, 2008 at 12:50 AM, Thiago Rafael Becker < [EMAIL PROTECTED]> wrote: > Hi, all > > I was looking at the recursive functions and below are my findings. > > In the cas

Re: REST URL Mapping - The changes done in pattern matching Algorithm

2008-11-22 Thread Dimuthu Gamage
On Sat, Nov 22, 2008 at 5:01 PM, Dumindu Pallewela <[EMAIL PROTECTED]>wrote: > Hi All, > While I doubt the need for removing recursion here (given the fact that > using more than a few url components will plainly be an overkill), it seems > to me that removing recursion from both the functions is

Re: REST URL Mapping - The changes done in pattern matching Algorithm

2008-11-22 Thread Dumindu Pallewela
Hi All, While I doubt the need for removing recursion here (given the fact that using more than a few url components will plainly be an overkill), it seems to me that removing recursion from both the functions is quite straight forward. As it was mentioned earlier the function axis2_core_utils_int

Re: REST URL Mapping - The changes done in pattern matching Algorithm

2008-11-21 Thread Damitha Kumarage
Thiago Rafael Becker wrote: Hi, all I was looking at the recursive functions and below are my findings. In the case of axis2_core_utils_internal_build_rest_map_recursively, which is a tail-recursive function, seems easy to convert it to a iterative function. In the case of axis2_core_utils_int

Re: REST URL Mapping - The changes done in pattern matching Algorithm

2008-11-21 Thread Dimuthu Gamage
On Sat, Nov 22, 2008 at 1:20 AM, Thiago Rafael Becker < [EMAIL PROTECTED]> wrote: > Hi, all > > I was looking at the recursive functions and below are my findings. > > In the case of axis2_core_utils_internal_build_rest_map_recursively, > which is a tail-recursive function, seems easy to convert i

Re: REST URL Mapping - The changes done in pattern matching Algorithm

2008-11-21 Thread Thiago Rafael Becker
Hi, all I was looking at the recursive functions and below are my findings. In the case of axis2_core_utils_internal_build_rest_map_recursively, which is a tail-recursive function, seems easy to convert it to a iterative function. In the case of axis2_core_utils_internal_infer_op_from_rest_map_r

Re: REST URL Mapping - The changes done in pattern matching Algorithm

2008-11-21 Thread Damitha Kumarage
Hi Dimuthu, Yes the blog post explain it very well. I could not understand it by looking at your previous mail or by looking at the code. Is there a way we can avoid recursion? thanks Damitha Dimuthu Gamage wrote: Did a blog post explaining the $subject, http://www.dimuthu.org/blog/2008/11/21/

Re: REST URL Mapping - The changes done in pattern matching Algorithm

2008-11-21 Thread Dimuthu Gamage
Did a blog post explaining the $subject, http://www.dimuthu.org/blog/2008/11/21/apache-axis2c-restful-url-mapping-algorithm/ Thanks Dimuthu On Thu, Nov 20, 2008 at 10:01 AM, Dimuthu Gamage <[EMAIL PROTECTED]> wrote: > Hi devs, > > As you may have already noticed, I changed the REST URL pattern

Re: REST URL Mapping - The changes done in pattern matching Algorithm

2008-11-20 Thread Thiago Rafael Becker
Hi, On Thu, Nov 20, 2008 at 2:51 PM, Dimuthu Gamage <[EMAIL PROTECTED]> wrote: > Hi Thiago, > > Yes, recursive should anyway cause problems with small stacks. But I think > we can safely assume the number of url component will not exceed 4/5 times. > If the call stack is still smaller than that n

Re: REST URL Mapping - The changes done in pattern matching Algorithm

2008-11-20 Thread Dimuthu Gamage
Hi Thiago, Yes, recursive should anyway cause problems with small stacks. But I think we can safely assume the number of url component will not exceed 4/5 times. If the call stack is still smaller than that number, the code will fail. On Thu, Nov 20, 2008 at 3:40 PM, Thiago Rafael Becker < [EMAI

Re: REST URL Mapping - The changes done in pattern matching Algorithm

2008-11-20 Thread Thiago Rafael Becker
The only thing that worries me is the recursion. Suppose that I have a small stack (which is common on embedded systems), and a long chain of possibilities to a single pattern or even several patterns (which may be common). Can this overflow the application stack? Can these functions be implemented

REST URL Mapping - The changes done in pattern matching Algorithm

2008-11-19 Thread Dimuthu Gamage
Hi devs, As you may have already noticed, I changed the REST URL pattern matching algorithm while fixing the https://issues.apache.org/jira/browse/AXIS2C-1290 issue and the WSF/PHP issue, https://wso2.org/jira/browse/WSFPHP-347. Since Apache's principle is to 'Commit first' I committed the code f