Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8975283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:50:19+00:00 2026-06-15T18:50:19+00:00

This is the main part of my ObjC epub files encryptor code @autoreleasepool {

  • 0

This is the main part of my ObjC epub files encryptor code

@autoreleasepool {
    for(NSMutableString* epub in self.epubs){
        bookKey = [[NSMutableString alloc] initWithString:[self genRandStringLength:16]];
        [self performSelectorOnMainThread:@selector(encrypt:) withObject:[NSArray arrayWithObjects:epub,bookKey,nil] waitUntilDone:YES];
    }
}

The selector “encrypt” includes these method calls

  • create folder for epub extraction
  • unzip epub file and put the content files into extraction folder
  • create ZipFile for encrypted epub
  • read each files within extraction folder, create ZipWriteStream and encrypt the file data
  • write each encrypted data stream into ZipFile
  • close ZipFile and change zip name extension to .epub

The process is quiet fast when it is just started. But the process getting slower and slower as more file had been written. i’m so sorry for i cannot expose the selector’s definition because of my company secrecy policy. but i’m very sure the problem isn’t come from it. Below is the console log sample. actually those files are just the clone of the same file with different name

  • Epub Name : A.epub
    • Book Key : 4151FDD721564E40
    • Time taken : 0.440156
  • Epub Name : B.epub
    • Book Key : BC23C09C4625429E
    • Time taken : 0.675541
  • Epub Name : C.epub
    • Book Key : AF872798FAEA4EDE
    • Time taken : 0.974213
  • Epub Name : D.epub
    • Book Key : 250C319928E54D2C
    • Time taken : 1.332154
  • Epub Name : E.epub
    • Book Key : EC4EC65605D246EB
    • Time taken : 1.705329
  • Epub Name : F.epub
    • Book Key : E10588A8CB584ACD
    • Time taken : 2.209807
  • Epub Name : G.epub
    • Book Key : 9B572BF9428E4DFB
    • Time taken : 2.797980
  • Epub Name : H.epub
    • Book Key : BC05B2A629C44A85
    • Time taken : 3.389614
  • Epub Name : I.epub
    • Book Key : 79DB7AAFC8CA4655
    • Time taken : 4.936718
  • Epub Name : J.epub
    • Book Key : B0413DF2356048A7
    • Time taken : 5.441939
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:50:19+00:00Added an answer on June 15, 2026 at 6:50 pm

    You should profile your program with the Time Profile tool in Instruments, and see what’s taking the time. Also, an inner autorelease pool for that loop might be helpful if memory growth turns out to be an issue.

    (For future reference, “I’m quite sure it’s not X” nearly always ends up meaning “It’s X” 😉 )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This part of my code works fine: #include <stdio.h> int main(){ //char somestring[3] =
//Good day. This is just a part of my source code. My main predicament
In this code, http://enjalot.com/inlet/4124664/ of which the main part is: function render(data) { var
I have Javascript function defined in the main index.html file. One part of this
Code first: '''this is main structure of my program''' from twisted.web import http from
I have imported xlrd etc. The main part of my code is then as
I'm trying to structure my code like this main <- game <- player. IF
I have this JSP, look for the last line there is the main part
This is the main part of my errorhandler: function my_error_handler($errno, $errstr, $errfile, $errline){ $errno
How would you remove 00bf00 part from this: #main { background:#00bf00 00bf00 url('images/low.png') repeat;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.