Created
October 2, 2024 05:33
-
-
Save rajvermacas/d8c37ec2adec7ac544cbb3ad17d1177e to your computer and use it in GitHub Desktop.
Prompts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. | |
I have a list of objects. The objects are of type Document. This Document is a user defined class. The list has 100000 documents. After doing the business logic when the for loop tries to find out the next element from the list. it is almost taking 100 ms which is unexpected. | |
I need to find out what is making the iteration of elements so time consuming. How can i go deep into debuging the logic of for loop which can show some insight as to what is taking time. my for loop looks like below: | |
for document in documents: | |
logger.info("Start processing of document") | |
# I have business logic here | |
logger.info("Processing of document completed") | |
After the log | |
Processing of document completed | |
it takes 100 milisecond to print | |
Start processing of document | |
I need to find out what is happening in those 100 milisecond | |
2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment