Hi Friends,
I work for a software company .Iam at present working in a module in my companies project .
To see the project online kindly visit
http://www.buddiesinfotech.com/faithlinks/
in this page you will see many links under headings such as SPIRITUAL GROWTH,ONLINE INFORMATION etc... the site has around 3500 links total
and i bring everything from the mysql db and then the javascript is done.
The problem i face is that .. since all the links are from the db
1) The site is very very slow in its development stage in the above link.So in future, If many users connect to the db when the site is made live .. then the site will become more slower.
2) Even if its slow the site loads fully in some of the machines.. but the major problem is that in some machines the links area never load at all.Thats too bad.
How can this be solved ? should i try to change the queries ? or should i brind in the data from a txt file ..etc ?
any better suggestions on this ?
Kindly assist me in this regard.
Thanks Everybody
Shankar
3500 links from mysql DB
Moderator: General Moderators
Personally, I don't think it's a good way to do it. It'll only get slower in time as more links are added. It's nice that once it is loaded the JavaScript makes the sublinks popup quickly. But the initial load time could potentially drive people away.
I personally would only get the main link title (eg. SPIRITUAL GROWTH,ONLINE INFORMATION etc). That way you'll only get a few returns. Lose the JavaScript to display the sublinks. When the main link is clicked, query the PHP again and retrieve only the links relevant to the link that was clicked (as well as the main topic ones) and display the page accordingly.
I personally would only get the main link title (eg. SPIRITUAL GROWTH,ONLINE INFORMATION etc). That way you'll only get a few returns. Lose the JavaScript to display the sublinks. When the main link is clicked, query the PHP again and retrieve only the links relevant to the link that was clicked (as well as the main topic ones) and display the page accordingly.
xml ?
Hi SBukoski,
Thanks for your reply.I cannot lose the Javascript because the client surely wants this way.
I have another idea... kindly find if that would be fine.
I will use XML .I will have a global variable in the server and store everything in the memoryand ill use the cronjob to update the variable everyday if new links are added. Is this idea anything kind of usable ?
Kindly reply.
Thanks,
Shankar
Thanks for your reply.I cannot lose the Javascript because the client surely wants this way.
I have another idea... kindly find if that would be fine.
I will use XML .I will have a global variable in the server and store everything in the memoryand ill use the cronjob to update the variable everyday if new links are added. Is this idea anything kind of usable ?
Kindly reply.
Thanks,
Shankar
-
fractalvibes
- Forum Contributor
- Posts: 335
- Joined: Thu Sep 26, 2002 6:14 pm
- Location: Waco, Texas
I would agree with all said so far. Don't store everything in memory as XML - you will bring the server to it's knees. Look first at your database design. You would do well with using some domain tables to store the link categories(and perhaps another table with subcategories). Retrieve those only when first displaying the page. Only when you need to drill down to specifics do you need go after the other data.
McGruff makes a good point about the javascript - but if you must use, you could generate on the fly with your PHP code. But, since you should make a trip back to the server anyway, you could do with PHP perhaps?
fv
McGruff makes a good point about the javascript - but if you must use, you could generate on the fly with your PHP code. But, since you should make a trip back to the server anyway, you could do with PHP perhaps?
fv