Welcome Guest, Not a member yet? Register   Sign In
Does Active Record scan the table before any model functions are called?
#1

[eluser]taewoo[/eluser]
Someone mentioned that it does that.. does anyone know if this is so and is there a documentation/bug issue for this?

If this is the case, this seems pretty inefficient.... is there a way around this?
#2

[eluser]Randy Casburn[/eluser]
Hey cool avatar one!

Can you be more precise with your question? I'm not sure how "Active Record" could "scan the table" before "any model functions are called". If you think about the logic of this, how would AR know which tables to scan?

Besides, I did a quick look through the code and there is no indication this happening anywhere. So what was the conversation, under what circumstances, etc.

Let's figure this out.

Randy
#3

[eluser]taewoo[/eluser]
The exact wording I got from another developer:

"now CI has a serious bottleneck at it's object dispatcher. for example, if you load active record - it scans the corresponding table everytime (for mapping fields with schema) before executing. it not only degrade the disppatching but also increase the response time."

Randy, i agree... i did a grep for "desc" on the core CI files.. can't seem to find anything relevant.
#4

[eluser]Xeoncross[/eluser]
I didn't find anything in the SVN code about this and the Profiler does NOT list any queries to the DB for info. I don't think this happens.
#5

[eluser]Randy Casburn[/eluser]
A brief look at every __constructor() in the Database directory shows no evidence of this.

Perhaps this person was looking at some Add on component or a very old release of CI. Have this developer provide code. I'll run it through a debugger and provide the stack trace.

Essentially, taewoo, I'm thinking this is just hyperbole -- BS in other words.

Randy
#6

[eluser]taewoo[/eluser]
Randy, which debugger/stacktracer do u use?

Oh and my avatar... thanks. I am not sure if it's a dead dog or a sleeping furby.
#7

[eluser]Randy Casburn[/eluser]
Avatar - right, I've commented on it before - just think it's the coolest - I'm jealous.

I use NuSphere's PhpEd. Built-in PHP debugger/profiler full professional IDE.

Makes life easy.

Randy
#8

[eluser]Xeoncross[/eluser]
PDT for eclipse is better Tongue
#9

[eluser]Randy Casburn[/eluser]
No...it isn't. Eclipse sucks. :coolgrin: (hijacker!)
#10

[eluser]Xeoncross[/eluser]
NuSphere PhpED 5.5 Price: $495.00

That is what I would says "sucks".




Theme © iAndrew 2016 - Forum software by © MyBB