partkeepr / PartKeepr

Open Source Inventory Management
http://www.partkeepr.org
GNU General Public License v3.0
1.38k stars 400 forks source link

Number of Partkeepr files on the server #932

Closed mitjakukovec closed 4 years ago

mitjakukovec commented 6 years ago

System Information

How to reproduce

When I extracted the partkeepr archive file partkeepr-1.3.0.zip to the server, I did count for 42.502 files in the extracted folder. It was a little surprise to me that after I was finished with a setup procedure, the number of files increased to the astonishing 133.000+.

I have to comply with some of the restrictions assigned by my web hosting provider, and one of them is number of nodes (number of all files and directories) that are allowed on the server. With this substantial increase of files just for partkeepr setup (there are no parts in the database yet), I am using almost half of the nodes allowed.

Why there is so many files after the setup procedure? Are there files that are just left overs from the setup I could delete? Are there any temporary files that could be deleted without any damage?

Thank you

mitjakukovec commented 6 years ago

I was able to figure out that this file number increase comes from the application cache folder (./partkeepr-1.3.0/app/cache).

Am I correct to assume that whatever there is in the ./partkeepr-1.3.0/app/cache/setup and ./partkeepr-1.3.0/app/cache/setup_test folders is safe to delete?

Thank you

Drachenkaetzchen commented 6 years ago

Yes, you can remove the setup and setup_test caches. However, they will be re-created when you re-run setup.

This is related to #928

Drachenkaetzchen commented 6 years ago

During testing if and how PartKeepr can be migrated to Symfony3, I also realized that the amount of files in the cache directories is now significantly smaller than with Symfony2.

Examples:

Directory Num Files SF2 Num Files SF3
app/cache/dev 68778 7323
app/cache/prod 29737 2545

I do not have numbers for the setup and setup_test directories, but they should be similar to the app/cache/dev directory. Overall, I expect a 90% decrease in required files, which also helps with small filesystems where the inode count is limited.

christianlupus commented 4 years ago

@mitjakukovec I think, your question was answered by Drachenkaetzchen, right? I will therefore close the issue here.