I have a single app.R file that runs several algorithms on user data - all of which are very well separated and organized in the file. One common approach I've seen is to divide this file up into ui, server, and other scripts (called using source()
for example).
Does splitting one huge file into multiple have benefits beyond organization? If we disregard the fact that it's easier to work on the app in separated files - will it actually load faster?
The current file takes several moments just to chug through the several thousands of lines of code. Let's say 80% of the functions being performed aren't called until the user clicks a button within the app. Would the app be faster by calling these functions from an associated file rather than load them at once in the beginning?
Thanks!