ITNEXT

ITNEXT is a platform for IT developers & software engineers to share knowledge, connect, collaborate, learn and experience next-gen technologies.

Follow publication

Data structure for file management application

Héla Ben Khalfallah
ITNEXT
Published in
20 min readFeb 11, 2024

--

Exploring advanced data structures

Advanced data structures (Image licensed to the author)

Introduction

The project idea

I want to create a file management application that can explore a file system through a web application, in the same way as Windows Explorer on Windows.

The application provides a graphical user interface for accessing and managing the file systems. It can handle all file operations, including creation, renaming, searching, deleting, and more.

File management application (Image licensed to the author)

My initial challenge is to determine the proper data structure for visualizing directories and files. The solution must have the ability to handle a large number of files.

The purpose of this article is to tackle this challenge. Let’s start by reviewing the standard data structures.

Limitations of standard data structures

To build a file manager, it is important to take into account several factors, such as the use of storage (disk or memory), the access time for random and sequential processing, as well as the efficiency of searches.

However, most standard data structures, such as arrays, linked lists, stacks, queues, and others, are near-optimal in one aspect but not efficient in another. Let’s look at the table below:

Big-O Algorithm Complexity Cheat Sheet (Know Thy Complexities!) @ericdrowell (bigocheatsheet.com)

For example, while accessing an element of the array takes O(1), the other operations are greedy O(n). Similarly, the access and search time in Stack, Queue and Linked List takes O(n).

Keep in mind that the CPU time is calculated using this formula:

CPU Time = IC * CPI / Clock Rate

IC: Instruction Count of a program
CPI: Cycle per instruction

The more steps to run (instructions), the higher the CPU time and the worse the performance of the application.

--

--

Published in ITNEXT

ITNEXT is a platform for IT developers & software engineers to share knowledge, connect, collaborate, learn and experience next-gen technologies.

Written by Héla Ben Khalfallah

Hello! I'm Héla Ben Khalfallah. I'm a software engineer with a wealth of experience in web solutions, architecture, frontend, FrontendOps, and leadership.

Responses (4)

Write a response