Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
1 big language file vs many small?
Old 01-09-2010, 08:37 AM 1 big language file vs many small?
Junior Talker

Posts: 1
Trades: 0
Hello to all,

This is my first message to this prominent forum. Basically my language file is growing and is now over 2200 lines long.
Since I suspect this can be a bottleneck when it comes to performance I was thinking of making many small files and load corresponding language file dynamically for each page.

Is this true or not?

Or is it better to have one large file?
I am using php5 and Smarty Template Engine.

Cheers to all
Pylon is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-09-2010, 08:48 AM Re: 1 big language file vs many small?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
It depends on how the file is loaded.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-09-2010, 12:29 PM Re: 1 big language file vs many small?
lynxus's Avatar
Awesomeo-Maximo

Posts: 1,618
Location: UK
Trades: 1
I world personally have them in a lang folder in separate files.

Not for speed. But for my own sanity when it comes to making new ones or editing.
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE


lynxus is offline
Reply With Quote
View Public Profile Visit lynxus's homepage!
 
Old 01-09-2010, 02:01 PM Re: 1 big language file vs many small?
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
When I setup such a structure, I have 1 that I load for every page and then an optional 1 that can be loaded for specific pages. My goal is to minimize file accesses and memory usage while retaining code optimization and easing editing.

And, welcome to W-T!
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 01-09-2010, 02:05 PM Re: 1 big language file vs many small?
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
On linux, it should not be a problem, depending if you parse it or not at each load.
The system will put it in the memory cache and every subsequent read will be done from memory.
But if you parse that file at each load, then yes, you'd better split it in separate files.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to 1 big language file vs many small?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20852 seconds with 12 queries