Why not add the code to do so? The biggest problem is several routines would need to be modified to pass around the data. It was just easier to put hooks in all the functions for the database. Writing your own database interface and caching the queries could do it as well.

We eventually dumped the idea of using an external database period, and ended up putting our own hash based system in place.

Preston Garrison
direct: 877-748-4142
fax: 310-774-3901
cell: 623-748-4140

-----Original Message-----
From: Matthew Boehm <[EMAIL PROTECTED]>
To: snacktime <[EMAIL PROTECTED]>; Asterisk Users <[email protected]>
Sent: Sun, 22 May 2005 12:27:06 -0500
Subject: Re: [Asterisk-Users] realtime excessive database queries

The queries you speak of are not native to realtime. They are part of pbx as a whole. And yes, the core programmers are aware of it and yes, they have
admitted they don't like it.

> Why not just load all the extensions into memory, and then have a
> mechanism to mark an extension as stale and only then reload from the
> database? Seems that with a basic caching mechanism you get all the
> benefits of realtime without the downside of taking a performance hit
> like it does now when having to go to the database so much.
>
> If I'm reading the code right the extensions are all in a linked list.
> So it seems you could just add another item to the list to hold the
> state of the extension, and when accessing the first item in the list
> check the state. If it's stale and realtime is in use, update the
> extension from the database and restart at the top of the list.
>
> Chris

_Matthew


_______________________________________________
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

_______________________________________________
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to