HI!
You might wanna use slugs. That (i think it) would help you out.
Instead of having routes like "@subpage?id=56" that would be translated to
"/another_page", you would have just:
"@subpage?slug=another_page", "@subpage?slug=a_page",
"@subpage?slug=a_second_page"
and your "subpage" route would be:

subpage:
  url: /:slug
  param: { module: a_module, action: an_acttion, slug: index }  #that would
autommatically match an index page for a page that has slug = null parameter


Of course i do not know what you really have there (how is your routing.yml
file)

Alecs

On Mon, Oct 19, 2009 at 11:38 PM, Jacob Coby <jc...@portallabs.com> wrote:

>
> Hi all,
>
> I've been working on a symfony 1.2 app that includes a CMS.
> Unfortunately, the CMS system generates approximately 3000 routes
> programmatically across 4 different module/actions.   Unfortunately
> there is no sort of pattern to the routes and the cms uses the routing
> system to generate the final url.  For example, cms/index?id=23 would
> get translated to /about_us.  And cms/subpage?id=56 would get
> translated to /another_page.
>
> This generates a 6.5mb routing cache which expands to well over 64mb
> once running in PHP (I had to set the memory limit to 128mb just to
> get it running).  With a small EC2 instance (256mb), the site
> immediately starts to eat up the 200mb free and marches towards the
> swap of death.
>
> I tried writing a custom routing object that would query the database
> to do the routing, but it doesn't solve the problem of needing to
> generate the urls from page IDs.
>
> Does anyone have suggestions on how to get this routing system under
> control?
>
> Thanks,
> --
> Jacob Coby
>
>
>
>
>
>
>
> >
>


-- 
As programmers create bigger & better idiot proof programs, so the universe
creates bigger & better idiots!
I am on web:  http://www.alecslupu.ro/
I am on twitter: http://twitter.com/alecslupu
I am on linkedIn: http://www.linkedin.com/in/alecslupu
Tel: (+4)0748.543.798

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to