• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

.JSX vs .JSXBIN ??

LEGEND ,
Feb 24, 2021 Feb 24, 2021

Copy link to clipboard

Copied

I maintain a functions library in .jsx and distribute to about 5 users via OneDrive. It works fine and is about 156kb. It is loaded about once a day or when it is updated. 

  • Are there any advantages/reasons to make this a .jsxbin file? I am not as concerned about file protection as I am about possible speed advantages.
  • Can it be exported from VSCode since ESTK is now defunct?
TOPICS
Scripting , SDK

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Feb 24, 2021 Feb 24, 2021

Hey there! I'm not sure what speed advantages there are to transferring 156kb? That seems like a small amount, once per day - but rest assured - turning it into JSXBIN will make that size bigger because out of every normal text character in your code it will make a bunch of characters that encrypt that one.

 

As to your 2nd point, yes with your VSCode extension comes a JSXBIN command- activate it by doing Cmd+Shift+P and type in "jsxbin" to find the command.

Votes

Translate

Translate
Adobe
Valorous Hero ,
Feb 24, 2021 Feb 24, 2021

Copy link to clipboard

Copied

Hey there! I'm not sure what speed advantages there are to transferring 156kb? That seems like a small amount, once per day - but rest assured - turning it into JSXBIN will make that size bigger because out of every normal text character in your code it will make a bunch of characters that encrypt that one.

 

As to your 2nd point, yes with your VSCode extension comes a JSXBIN command- activate it by doing Cmd+Shift+P and type in "jsxbin" to find the command.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 24, 2021 Feb 24, 2021

Copy link to clipboard

Copied

Thanks, @Silly-V . This was an off-shoot of you recent post. I had just tracked down how to export the jsxbin by right-clicking within the script file in VSCode (with ExtendScript Debugger installed). 

The JSXBIN is 133KB vs 156KB for the JSX. I'll run it and see if I can detect any difference in speed.

 

EDIT:
My initial observation is it seems to work a bit faster. I'm using a tip from this YouTube post

suggesting the JSXBIN content can be pasted directly into a standard JSX for easier accessibility. It works. I'm not sure you couldn't just rename the JSXBIN file though. I send the JSX to AI through an Applescript from Keyboard Maestro so leaving as a JSX is helpful.

Followup: The jsxbin file works fine when run from Keyboard Maestro.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Feb 24, 2021 Feb 24, 2021

Copy link to clipboard

Copied

Ha, so it's smaller. I just remember putting a small string into a JSXBIN to hide a password and ended up getting with a lot longer string. Maybe it can optimize a bunch of other stuff somehow. Maybe someone can pop in to explain how it really works!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 24, 2021 Feb 24, 2021

Copy link to clipboard

Copied

Yeah, and the fact I can "wrap" it in a normal JSX makes accessing it simpler. 
Edit: The jsxbin works fine in Keyboard Maestro.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 24, 2021 Feb 24, 2021

Copy link to clipboard

Copied

you can rename your *.jsxbin to *.jsx without issues, illustrator knows it's a jsxbin somehow.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 24, 2021 Feb 24, 2021

Copy link to clipboard

Copied

Carlos, The jsxbin file starts with a plain text header, eg.

@JSXBIN@ES@2.0@MyBbyBn0AFJlVnABjzHiNjJjUjUjFjOjTBfWzGiPjCjKjFjUCiJzJ...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 24, 2021 Feb 24, 2021

Copy link to clipboard

Copied

But there appears to be considerable overhead, too, not just the binary encoding bloat. In my test it turned a 110 byte jsx into 154KB jsxbin! VSCode referred to the file as 'compiled'. Is it possible that it really compiles it somehow, rather than just encodes it? That might explain the overhead, and also the minimisation at larger file sizes. Sorry I have no idea, just my thoughts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 24, 2021 Feb 24, 2021

Copy link to clipboard

Copied

In my VSCode I found it by searchng "bin" which showed "Export to binary..." which did export a .jsxbin file. Do you have a dedicated "jsxbin" command?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Feb 24, 2021 Feb 24, 2021

Copy link to clipboard

Copied

No, I just think I found it the one time I used it by entering 'jsxbin', I probably wasn't even thru typing it lol

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 24, 2021 Feb 24, 2021

Copy link to clipboard

Copied

I just noticed this VSCode extension TextToJSXBIN. Seems to convert to JSXBIN inline and use eval().

 

UPDATE: I couldn't get this to work. It gave me error: "(#12)Unable to retrieve last error information." when running in debugger. Oh well.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 24, 2021 Feb 24, 2021

Copy link to clipboard

Copied

LATEST

I'm using ExtendScript Debugger plugin to export the jsxbin and find it is smaller than the original jsx (156 to 133KB).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines