doukanwa6872 2012-03-01 19:10
浏览 7

too long

Is it faster search file in a tree of directory or search a file path in a single associate key - value file for load a class? example first case:

dir
   file1
   file2
   dir2
       file3
       dir3
           file4
   dircommon
       file5

example second case: single file ( test.config.txt ) with associate key - value:

file1=/dir/
file2=/dir/
file3=/dir/dir2/
file4=/dir/dir2/dir3 

I search file4 and then load class defined into file4

What is more faster method?

There is a faster and perfomance method to manage depencencies of php files?

  • 写回答

2条回答 默认 最新

  • duanmei2459 2012-03-01 19:13
    关注

    The first method is easier because you don't have to update your index file for every new model/controller you add, and I don't think the performance difference is going to be that big unless you're loading thousands of classes on every page load, in which case you should just switch to Java. :P

    Our in-house framework just searches file paths based on the class name... i.e. Application_Model_Person would map to '<include dir>/Application/Model/Person.php'.

    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?