![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| ||||
| ||||
|
I know PHP programming but I found it to be too slow to analyze very big files like web log files. Often I got the job half done and takes a long time. Can anyone recommend any programming language that run fast? Thanks. |
|
#2
| ||||
| ||||
|
You probably want high-level languages (i.e. interpreted). If you don't already know C or C++, it's a whole different world from php. the learning curve can be very, very steep. Depending on whether or not you are in complete control of your environment, you have these basic choices: Perl Python Ruby Java (JSP) Microsoft platforms have a number of choices in addition to these, but I am not so familiar with them. these are all system scripting languages, not web server languages, like php. You communicate to the web server though a CGI glue layer. I wouldn't recommend trying other languages, as it can be very hard to get support for them, as well as expect a hosting environment to support them. I've done just about every kind of programming that you can imagine, including punching raw hex machine code into an EEPROM with an ICE, and designing fairly complex C++ systems. I would suggest looking for libraries and tools in your hosting environment that could help you out; not just the language you are using. For example, UNIX/Linux environments have a couple of tools called SED and AWK. these can often be invoked through system interface calls from other languages. I would also suggest Perl and Java as a couple of your best bets. Java gets "precompiled," so it is similar to many compiled languages, but the learning curve is just as steep as with C. Perl is a complete bear to program, but is easily the most powerful text processing language out there. I hate it, and look for other avenues. Python is usually precompiled as well, but is not always as well-supported as other languages. it is also a bit strange if you are coming from a more traditional language. |
|
#3
| ||||
| ||||
|
In my opinion, you shouldn't change languages, but change your approach. analyze what type of information you need from the logfiles. there is probably some repetition in the tasks and most time.is probably consumed by a small part of the algorithm. Now create a task that does as much as possible pre-processing on the files. I.e. filtering records you don't need, sorting the data, or dump the data to an SQL database which has proper indexes to the information you normally need. If you don't need hard real-time.data, you could run this pre-process job from a crontab and perform only the latest step in your on-line php session. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What programming language is the easiest? | efraim0801 | Work From Home Tools | 9 | 07-23-2007 07:37 AM |
| Programming tools | mysteryshop | SEO & Web Design | 8 | 07-16-2007 06:16 PM |
| Best programming language for Accounting Software | phine_0428 | Work From Home Tools | 0 | 02-24-2007 05:38 PM |
| best programming language | igauresh | Work From Home Tools | 5 | 02-08-2007 12:03 PM |
| Object oriented programming | monetary | Work From Home Tools | 0 | 11-16-2006 03:48 PM |