# |
Sep 12th 2009, 16:56 |
unclezoot |
well im using wamp on this laptop so i daresay it can be tweaked a hell of lot more |
# |
Sep 12th 2009, 16:56 |
AD7six |
unclezoot: some profiling would help find out what. as you kind of pointed out, caching isn't your answer (although it's subsequently help) |
# |
Sep 12th 2009, 16:55 |
AD7six |
unclezoot: >1s is unusable 1/2s with debug = 0 probably means you have something not right in your setup |
# |
Sep 12th 2009, 16:54 |
unclezoot |
"async: false" seems to be a known limitation of remysharp's autosuggest plugin, and changing it to true breaks it, so ill have to grin and bear the delay it seems |
# |
Sep 12th 2009, 16:53 |
BlackIce |
np |
# |
Sep 12th 2009, 16:53 |
thun_ |
kk ty |
# |
Sep 12th 2009, 16:52 |
BlackIce |
$this->useDbConfig or something like that |
# |
Sep 12th 2009, 16:52 |
BlackIce |
check the books ;) |
# |
Sep 12th 2009, 16:52 |
thun_ |
ok.. how do I set a model to always use another datasource? |
# |
Sep 12th 2009, 16:51 |
BlackIce |
you can easily screw up your cache by using such tricks |
# |
Sep 12th 2009, 16:51 |
thun_ |
ahh |
# |
Sep 12th 2009, 16:51 |
BlackIce |
which will represent that other table |
# |
Sep 12th 2009, 16:51 |
BlackIce |
if you need access on a table on another database you could make another model for it |
# |
Sep 12th 2009, 16:51 |
thun_ |
I need to grab some info from that side in this model function |
# |
Sep 12th 2009, 16:51 |
thun_ |
It is... but I have another site runnign on the server |
# |
Sep 12th 2009, 16:50 |
BlackIce |
a model should be tied to one table |
# |
Sep 12th 2009, 16:49 |
thun_ |
How do I switch my datasource from within a model for one query then switch back? |
# |
Sep 12th 2009, 16:49 |
unclezoot |
with debug = 0, it's now 462ms |
# |
Sep 12th 2009, 16:48 |
unclezoot |
thanks for both ideas! |
# |
Sep 12th 2009, 16:48 |
unclezoot |
that's where im going wrong, plus async: false is worth investigating |
# |
Sep 12th 2009, 16:48 |
unclezoot |
actually i might still have debug =2, i turned it off in the action but not in the ajax action |
# |
Sep 12th 2009, 16:48 |
BlackIce |
AD7six: I saw such times before, but that was on a 500mhz P3 with not enough RAM :P |
# |
Sep 12th 2009, 16:47 |
AD7six |
unclezoot: that's astronomical |
# |
Sep 12th 2009, 16:47 |
unclezoot |
1.14s |
# |
Sep 12th 2009, 16:47 |
AD7six |
unclezoot: what does firebug say is the response time for one of these lookups |
# |
Sep 12th 2009, 16:47 |
dogmatic69 |
its just because of something like async: false in the ajax options |
# |
Sep 12th 2009, 16:47 |
unclezoot |
and the fields are all indexed etc |
# |
Sep 12th 2009, 16:46 |
unclezoot |
yes |
# |
Sep 12th 2009, 16:46 |
dogmatic69 |
you can change that |
# |
Sep 12th 2009, 16:46 |
AD7six |
unclezoot: are you testing it with debug set to 0 |
# |
Sep 12th 2009, 16:46 |
unclezoot |
im having a play with a tagging plugin atm which uses remysharp's jquery autocomplete - i noticed that the browser is waiting for the server to return the ajax results, you can't actually type any more letters into your input |
# |
Sep 12th 2009, 16:45 |
dogmatic69 |
unclezoot: its really easy to do that in beforeSave and afterDelete |
# |
Sep 12th 2009, 16:45 |
BlackIce |
tnx ^^ |
# |
Sep 12th 2009, 16:44 |
unclezoot |
blackice, good point well made |
# |
Sep 12th 2009, 16:44 |
unclezoot |
i like ad7's solution, similar to pseudocoder's solution for building static html in the webroot where possible |
# |
Sep 12th 2009, 16:44 |
BlackIce |
unclezoot: yes, but you can prevent that by making/refreshing the cache when a item is added |
# |
Sep 12th 2009, 16:43 |
unclezoot |
of course, that's probably irrelevant in this example |
# |
Sep 12th 2009, 16:43 |
unclezoot |
i just remember a yahoo article where they said that caching wasnt always the solution, because it presupposes that someone has already made that cache already, in other words, if the user experience is bad on the 1st time they might not come back for the 2nd anyway |
# |
Sep 12th 2009, 16:43 |
AD7six |
personally, I treat the entire webroot as a cache folder |
# |
Sep 12th 2009, 16:42 |
BlackIce |
besides that it won't be worth it in messyness and maintainability |
# |
Sep 12th 2009, 16:42 |
BlackIce |
compared to using a cache instead of database for example |