Site structure
Version 6.x > Site structure > Performance concern for files on disk. Physical path vs. Alias path View modes: 
User avatar
Member
Member
trint.ladd@altn.com - 2/7/2012 3:10:06 PM
   
Performance concern for files on disk. Physical path vs. Alias path
To optimize our site's performance, we have chosen to store files on the file system and not in the database. After some experimentation, I see that files uploaded via the CMS are stored all together with file names changed to GUIDs from the database. It would seem that the files are somehow accessed by digging the alias path out of the database rather than accessing the file system directly.

Has anyone tested the performance difference between access via alias path and database versus direct file system?

Using paths and file names generated by DB GUIDs and renaming files makes my job really tough as far as tracking down possible problems in the file system.

Is there any setting or configuration to store files physically as they appear in the document tree? In other words, /MyFilePath/MyFile.pdf is actually stored at that location and with that name?

I know I could alter the CMS code, but I'm concerned about what affect that would have on later Kentico upgrades.

Thanks,
Trint

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/8/2012 6:20:22 AM
   
RE:Performance concern for files on disk. Physical path vs. Alias path
Hi,

Getting files from file system is always faster than from the DB. However, you see the GUIDs which are the attachment GUIDs from the DB so the file can be identified every time and there is no confusion and also getting to the file is faster using the GUID since they are stored in some way (what if you have /MyFilePath/MyFile.pdf file under 5 different parent folders?). The CMS system must have some record about the file - and this record is stored in the DB however the actual binary data are in the file system - so, retrieving the binary data from the file system is fast.

If you want to use your custom file names or the original file names, you can use the media library module.

Best regards,
Juraj Ondrus

Best regards,
Juraj Ondrus

User avatar
Member
Member
trint.ladd@altn.com - 3/1/2012 11:24:48 AM
   
RE:Performance concern for files on disk. Physical path vs. Alias path
Media Library seems to be the best solution for us. Thanks!