Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

/Util/FileList/FileList Benchmark
Function:
Required plugins for this example: MBS Util Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Util/FileList/FileList Benchmark
This example is the version from Wed, 16th Feb 2016.
Project "FileList Benchmark.rbp"
Class Window1 Inherits Window
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End Control
Control StaticText3 Inherits Label
ControlInstance StaticText3 Inherits Label
End Control
EventHandler Sub Open() StaticText1.text="Processing..." me.show 'MsgBox "Please wait. Benchmark can take a few seconds..." MakeFolder WalkFolderMBS WalkFolderRB End EventHandler
Sub MakeFolder() dim dir,file as FolderItem dim t as TextOutputStream dim i as integer dim s as string dir=SpecialFolder.Desktop.Child("FileList Benchmark data") dir.CreateAsFolder for i=0 to 9999 s=Format(i,"00000") file=dir.Child(s) t=file.CreateTextFile t.Write s t.Close next StaticText1.text="Created "+str(i)+" files." End Sub
Sub WalkFolderMBS() dim f as FileListMBS dim dir as FolderItem dim s as string dim i,c as integer dim t as integer t=ticks dir=SpecialFolder.Desktop.Child("FileList Benchmark data") f=new FileListMBS(dir) c=f.Count-1 for i=0 to c s=f.Name(i) // read all the names next t=ticks-t StaticText2.text=str(f.Count)+" items found via plugin: "+str(t) End Sub
Sub WalkFolderRB() dim dir as FolderItem dim s as string dim file as FolderItem dim i,c,t as integer t=ticks dir=SpecialFolder.Desktop.Child("FileList Benchmark data") c=dir.Count for i=1 to c file=dir.TrueItem(i) s=file.name // read all the names next t=ticks-t StaticText3.text=str(c)+" items found via pure RB: "+str(t) End Sub
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project

See also:

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Util Plugin.




Links
MBS Xojo Chart Plugins