Welcome Guest, Not a member yet? Register   Sign In
The Authentication Library 1.0.6
#41

[eluser]InsiteFX[/eluser]
Well it is going to add time because you are adding a library. It is hard for me to time things because I am on 12 MB broadband connection.

But a number of things could be affecting your timming, like if your running local etc.

Enjoy
InsiteFX
#42

[eluser]samhQC[/eluser]
Well if i run a page without Auth it loads in a 1/3 of a second.

If i load the page with auth it takes 2.3 seconds.

Immediately I thought it would be the database access that Auth is doing, but the profiler tells me the queries are returning very quickly.

At this point I think it's almost certainly an issue with how I am doing things, some configuration issue.

Surely it's not expected that using auth adds 2 seconds to page load time.

Update : It's only slow when I'm logged in.
#43

[eluser]InsiteFX[/eluser]
It is not the database causing it, look at the size of the Auth library being loaded.

Anytime you load a library etc the timming is going to take longer.

Sure you have 1/3 seconds.

But now you are loading the Auth library form validation library session library, Auth model, Auth helper form helper url helper email helper and Auth lang.

1 second more is great for what Auth is loading speed wise.

Enjoy
InsiteFX
#44

[eluser]Adam Griffiths[/eluser]
The Authentication Library shouldn't be adding that much time to your application. InsiteFX is on the right track saying there will be some added time to your application, but two seconds is a nightmare.

What version of PHP are you running?
What version of CodeIgniter are you running?
Are you sure you're on The Authentication Library 1.0.6?
Are there any other bottlenecks in your application?
Where are you seeing this time addition? Everywhere? Only on the admin panel?


Thanks,
Adam
#45

[eluser]samhQC[/eluser]
Thanks for your interest Adam.

I am going to do some more research, I expect the problem is with what I am doing, rather than the library itself.

If I can figure it out I will post what the solution was in case it helps others.

If I can't I will come back with more details looking for help Smile

I am using
Auth 1.0.6 and the latest version of codeigniter

Loading Time Base Classes 0.0161
Controller Execution Time ( sited / Index ) 5.0919
Total Execution Time 5.1081

The auth sessions query and user set identifier SQL queries are very fast, not half a second in total.

All my pages are very slow if I am logged in, but fast if I am logged out. I suspect it's maybe something to do with apache and sessions.

Cheers
Sam
#46

[eluser]InsiteFX[/eluser]
Are you using normal session or CI database sessions?

Enjoy
InsiteFX
#47

[eluser]Raykoid666[/eluser]
Hi all...

Using this library, i have noticed that inside the ci_sessions table, ip_address is 0.0.0.0

anything wrong here? how would i fix it?

thanks!
#48

[eluser]Adam Griffiths[/eluser]
[quote author="Raykoid666" date="1254939163"]Hi all...

Using this library, i have noticed that inside the ci_sessions table, ip_address is 0.0.0.0

anything wrong here? how would i fix it?

thanks![/quote]

The CodeIgniter Session Library uses 0.0.0.0 when a valid IP address isn't given.



Thanks,
Adam
#49

[eluser]Raykoid666[/eluser]
thanks for the reply adam,

another question here: when and how exactly are the forms processed? like i see the registration function inside the auth library loads the registration view, but also processes it, but i can't quite figure out how.

I need so somehow return TRUE if it's processed successfully, for registration, login, ... since i want to use jQuery together with this library.

thanks,
Kenny
#50

[eluser]Adam Griffiths[/eluser]
[quote author="Raykoid666" date="1254967387"]thanks for the reply adam,

another question here: when and how exactly are the forms processed? like i see the registration function inside the auth library loads the registration view, but also processes it, but i can't quite figure out how.

I need so somehow return TRUE if it's processed successfully, for registration, login, ... since i want to use jQuery together with this library.

thanks,
Kenny[/quote]

If you open up the file libraries/Auth.php – you can see the two functions in there, login() and register(). That's how it all works.

You could add some code into that file to shoot off a call to jQuery so when a user is registered/logged in you can do what you like with it.

Yes it's not pretty but it's the only way I can think of.


Thanks,
Adam




Theme © iAndrew 2016 - Forum software by © MyBB