Currently, mainstream domestic programs have the following problems:

Source: Internet
Author: User
Currently, mainstream domestic programs have the following problems)
Author [travel]
1. Low code efficiency-(take post. cgi in a famous Chinese forum as an example to obtain the code of the next thread)
I have no intention of attack, and I do not know whether this code is still available. This is the May 2001 version.
 
I will only comment on this clip
$ Dirtoopen = "$ lbdir". "forum $ inforum"; // open the Directory of the forum
Opendir (DIR, "$ dirtoopen ");
@ Dirdata = readdir (DIR); // read all files
Closedir (DIR); // Close the directory handle
@ Sorteddirdata = grep (/. thd. cgi $/, @ dirdata); // Obtain all topic files
@ Newdirdata = sort numerically (@ sorteddirdata); // sort
@ Neworderdirdata = reverse (@ newdirdata); // reverse
$ Highest = $ neworderdirdata [0]; // Retrieve the file name of the largest digit
$ Highest = ~ S/. thd. cgi $ //; // obtain the largest number
$ Newthreadnumber = $ highest + 1; // add 1 to obtain the expected digital data
As you can see, when posting a new topic, the code is very short, but all the files in the entire forum directory are scanned.
Sort once and twice
Assuming that this directory has multiple NN topics, the speed can be imagined.
Therefore, the "Forum seems to be slow, because there are many JS resources"
Argument
Is it true?
2. The code is nonstandard and belongs to the workshop type.
For example, in a famous CGI forum in China, the program component name is inexplicable, bbs, bbs1, bbs2,
Cjyh, xiu, and yhreg,
Worse, it usually appears inside the Chinese program.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.