PHP:包含来自深层嵌套目录层次结构的页面 - 性能问题 [英] PHP: Including a page from deeply nested directory hierarchy - performance issue

查看:157
本文介绍了PHP:包含来自深层嵌套目录层次结构的页面 - 性能问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设,我要在深层嵌套的目录层次结构中包含一些页面:

Suppose, I'm about to include some page from a deeply nested directory hierarchy:

require '/path/to/project/views/forms/member/login/submit.php'

我从经营中学到了什么系统课程:每次我们要访问/搜索文件时:读取路径的每个目录的 inode (在unix系统中)以查找文件。那么,由于这种包含还会影响性能吗?

I've learned from operating system course that: each time we want to access/search a file: the inode (in unix systems) of each directory of the path is read to locate a file. So, is it also going to affect performance due to this kind of inclusion?

对不起,如果我不清楚的话。

推荐答案

根据大多数计算机的当前处理速度,在深层嵌套目录中读取文件所花费的时间是微不足道的。你甚至都不会注意到它。

The time it'd take to read a file in a deeply nested directory is insignificant, based on current processing speeds for most computers. You wouldn't even notice it.

这篇关于PHP:包含来自深层嵌套目录层次结构的页面 - 性能问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆